Skip to content

Commit

Permalink
Revert "fabrics: retry discovery log page when DNR is not set"
Browse files Browse the repository at this point in the history
This reverts commit 2f27d84.

The result field is undefined for many commands and thus can have random values.
Thus we can't blindly evaluate these for all commands.

Signed-off-by: Daniel Wagner <[email protected]>
  • Loading branch information
igaw committed Apr 12, 2024
1 parent ebe5202 commit 7cf916f
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/nvme/fabrics.c
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,6 @@ static struct nvmf_discovery_log *nvme_discovery_log(
int retries = 0;
const char *name = nvme_ctrl_get_name(args->c);
uint64_t genctr, numrec;
__u32 result;
int fd = nvme_ctrl_get_fd(args->c);
struct nvme_get_log_args log_args = {
.result = args->result,
Expand All @@ -1077,21 +1076,13 @@ static struct nvmf_discovery_log *nvme_discovery_log(
name, retries, args->max_retries);
log_args.log = log;
log_args.len = DISCOVERY_HEADER_LEN;
if (!args->result)
log_args.result = &result;
retry_header:
if (nvme_get_log_page(fd, NVME_LOG_PAGE_PDU_SIZE, &log_args)) {
nvme_msg(r, LOG_INFO,
"%s: discover try %d/%d failed, error %d\n",
name, retries, args->max_retries, errno);
if (*log_args.result &&
!(*log_args.result & NVME_SC_DNR) &&
(++retries < args->max_retries))
goto retry_header;
goto out_free_log;
}

retries = 0;
do {
size_t entries_size;

Expand Down Expand Up @@ -1122,9 +1113,6 @@ static struct nvmf_discovery_log *nvme_discovery_log(
nvme_msg(r, LOG_INFO,
"%s: discover try %d/%d failed, error %d\n",
name, retries, args->max_retries, errno);
if (*log_args.result &&
!(*log_args.result & NVME_SC_DNR))
continue;
goto out_free_log;
}

Expand All @@ -1141,9 +1129,6 @@ static struct nvmf_discovery_log *nvme_discovery_log(
nvme_msg(r, LOG_INFO,
"%s: discover try %d/%d failed, error %d\n",
name, retries, args->max_retries, errno);
if (*log_args.result &&
!(*log_args.result & NVME_SC_DNR))
continue;
goto out_free_log;
}
} while (genctr != le64_to_cpu(log->genctr) &&
Expand Down

0 comments on commit 7cf916f

Please sign in to comment.