Skip to content

Commit

Permalink
nbft: Skip SSNS records pointing to well-known discovery NQN
Browse files Browse the repository at this point in the history
Depending on a pre-OS implementation, boot attempts pointing
to the well-known discovery NQN may get transformed in
an SSNS record (and marked as 'unavailable') in case
the discovery cannot be performed. Otherwise the NBFT
table should be populated by discovered records instead.

Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
  • Loading branch information
tbzatek committed May 17, 2024
1 parent 4349c81 commit 67f8d43
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions nbft.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,15 @@ int discover_from_nbft(nvme_root_t r, char *hostnqn_arg, char *hostid_arg,
for (i = 0; i < (*ss)->num_hfis; i++) {
hfi = (*ss)->hfis[i];

/* Skip discovery NQN records */
if (strcmp((*ss)->subsys_nqn, NVME_DISC_SUBSYS_NAME) == 0) {
if (verbose >= 1)
fprintf(stderr,
"SSNS %d points to well-known discovery NQN, skipping\n",
(*ss)->index);
continue;
}

host_traddr = NULL;
if (!cfg->host_traddr &&
!strncmp((*ss)->transport, "tcp", 3))
Expand Down

0 comments on commit 67f8d43

Please sign in to comment.