Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fabrics: move hostid/hostnqn warnings to verbose level #2164

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions fabrics.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@
return strdup(uuid + strlen("uuid:"));
}

void nvmf_check_hostid_and_hostnqn(const char *hostid, const char *hostnqn)
void nvmf_check_hostid_and_hostnqn(const char *hostid, const char *hostnqn, unsigned int verbose)
{
char *hostid_from_file, *hostid_from_hostnqn;

Expand All @@ -641,7 +641,8 @@

hostid_from_file = nvmf_hostid_from_file();
if (hostid_from_file && strcmp(hostid_from_file, hostid)) {
fprintf(stderr, "warning: use generated hostid instead of hostid file\n");
if (verbose)
fprintf(stderr, "warning: use generated hostid instead of hostid file\n");
free(hostid_from_file);
}

Expand All @@ -650,7 +651,8 @@

hostid_from_hostnqn = nvmf_hostid_from_hostnqn(hostnqn);
if (hostid_from_hostnqn && strcmp(hostid_from_hostnqn, hostid)) {
fprintf(stderr, "warning: use hostid which does not match uuid in hostnqn\n");
if (verbose)
fprintf(stderr, "warning: use hostid which does not match uuid in hostnqn\n");

Check failure on line 655 in fabrics.c

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: line length of 102 exceeds 100 columns
free(hostid_from_hostnqn);
}
}
Expand Down Expand Up @@ -741,7 +743,7 @@
hostid = hid = nvmf_hostid_from_file();
if (!hostid && hostnqn)
hostid = hid = nvmf_hostid_from_hostnqn(hostnqn);
nvmf_check_hostid_and_hostnqn(hostid, hostnqn);
nvmf_check_hostid_and_hostnqn(hostid, hostnqn, verbose);
h = nvme_lookup_host(r, hostnqn, hostid);
if (!h) {
ret = ENOMEM;
Expand Down Expand Up @@ -964,7 +966,7 @@
hostid = hid = nvmf_hostid_from_file();
if (!hostid && hostnqn)
hostid = hid = nvmf_hostid_from_hostnqn(hostnqn);
nvmf_check_hostid_and_hostnqn(hostid, hostnqn);
nvmf_check_hostid_and_hostnqn(hostid, hostnqn, verbose);
h = nvme_lookup_host(r, hostnqn, hostid);
if (!h) {
errno = ENOMEM;
Expand Down