Skip to content

Commit 2324758

Browse files
committed
fabrics: skip namespace scan for fabric commands
The fabric commands such as connect or disconnect don't need a full topology scan. The scan is not scalling well on larger setups, thus skip it. Signed-off-by: Daniel Wagner <dwagner@suse.de>
1 parent 81ad527 commit 2324758

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

fabrics.c

+6
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,7 @@ int nvmf_discover(const char *desc, int argc, char **argv, bool connect)
747747
}
748748
if (context)
749749
nvme_root_set_application(r, context);
750+
nvme_root_skip_namespaces(r);
750751
ret = nvme_scan_topology(r, NULL, NULL);
751752
if (ret < 0) {
752753
if (errno != ENOENT)
@@ -976,6 +977,7 @@ int nvmf_connect(const char *desc, int argc, char **argv)
976977
}
977978
if (context)
978979
nvme_root_set_application(r, context);
980+
nvme_root_skip_namespaces(r);
979981
ret = nvme_scan_topology(r, NULL, NULL);
980982
if (ret < 0) {
981983
if (errno != ENOENT)
@@ -1136,6 +1138,7 @@ int nvmf_disconnect(const char *desc, int argc, char **argv)
11361138
nvme_strerror(errno));
11371139
return -errno;
11381140
}
1141+
nvme_root_skip_namespaces(r);
11391142
ret = nvme_scan_topology(r, NULL, NULL);
11401143
if (ret < 0) {
11411144
if (errno != ENOENT)
@@ -1207,6 +1210,7 @@ int nvmf_disconnect_all(const char *desc, int argc, char **argv)
12071210
nvme_strerror(errno));
12081211
return -errno;
12091212
}
1213+
nvme_root_skip_namespaces(r);
12101214
ret = nvme_scan_topology(r, NULL, NULL);
12111215
if (ret < 0) {
12121216
if (errno != ENOENT)
@@ -1279,6 +1283,7 @@ int nvmf_config(const char *desc, int argc, char **argv)
12791283
return -errno;
12801284
}
12811285
if (scan_tree) {
1286+
nvme_root_skip_namespaces(r);
12821287
ret = nvme_scan_topology(r, NULL, NULL);
12831288
if (ret < 0) {
12841289
if (errno != ENOENT)
@@ -1433,6 +1438,7 @@ int nvmf_dim(const char *desc, int argc, char **argv)
14331438
nvme_strerror(errno));
14341439
return -errno;
14351440
}
1441+
nvme_root_skip_namespaces(r);
14361442
ret = nvme_scan_topology(r, NULL, NULL);
14371443
if (ret < 0) {
14381444
if (errno != ENOENT)

0 commit comments

Comments
 (0)