Skip to content

Commit 7cf916f

Browse files
dwsuseigaw
authored andcommitted
Revert "fabrics: retry discovery log page when DNR is not set"
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]>
1 parent ebe5202 commit 7cf916f

1 file changed

Lines changed: 0 additions & 15 deletions

File tree

src/nvme/fabrics.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,6 @@ static struct nvmf_discovery_log *nvme_discovery_log(
10511051
int retries = 0;
10521052
const char *name = nvme_ctrl_get_name(args->c);
10531053
uint64_t genctr, numrec;
1054-
__u32 result;
10551054
int fd = nvme_ctrl_get_fd(args->c);
10561055
struct nvme_get_log_args log_args = {
10571056
.result = args->result,
@@ -1077,21 +1076,13 @@ static struct nvmf_discovery_log *nvme_discovery_log(
10771076
name, retries, args->max_retries);
10781077
log_args.log = log;
10791078
log_args.len = DISCOVERY_HEADER_LEN;
1080-
if (!args->result)
1081-
log_args.result = &result;
1082-
retry_header:
10831079
if (nvme_get_log_page(fd, NVME_LOG_PAGE_PDU_SIZE, &log_args)) {
10841080
nvme_msg(r, LOG_INFO,
10851081
"%s: discover try %d/%d failed, error %d\n",
10861082
name, retries, args->max_retries, errno);
1087-
if (*log_args.result &&
1088-
!(*log_args.result & NVME_SC_DNR) &&
1089-
(++retries < args->max_retries))
1090-
goto retry_header;
10911083
goto out_free_log;
10921084
}
10931085

1094-
retries = 0;
10951086
do {
10961087
size_t entries_size;
10971088

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

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

0 commit comments

Comments
 (0)