47 lines
1.5 KiB
Diff
47 lines
1.5 KiB
Diff
From 7c2833a047ad9754ccb9b26b863f3967b85aad57 Mon Sep 17 00:00:00 2001
|
|
From: Daniel Wagner <dwagner@suse.de>
|
|
Date: Wed, 2 Jun 2021 15:42:42 +0200
|
|
Subject: [PATCH] nvme-topology: no error message when openeing of controller
|
|
fails
|
|
|
|
scan_ctrl() tries to open the controller device but this operation is
|
|
expected to fail for fabric setups when a path is down. This can lead
|
|
to the situation where the subsystem is in a healthy state, e.g. at
|
|
least one path is in live state. In this scenario a failure is printed
|
|
although everything is fine.
|
|
|
|
This is especially a problem for NVMe/TCP configs where the controller
|
|
remains in 'connecting' state for 10 minutes following a path
|
|
down. All that time 'nvme list' ends up in errors and that's a major
|
|
irritant for end users. This also makes CI automation more complex
|
|
than needed.
|
|
|
|
Just drop the error message as we have other error paths in this
|
|
function where we just bail out if they fail without printing an
|
|
error message.
|
|
|
|
Signed-off-by: Daniel Wagner <dwagner@suse.de>
|
|
---
|
|
nvme-topology.c | 4 +---
|
|
1 file changed, 1 insertion(+), 3 deletions(-)
|
|
|
|
diff --git a/nvme-topology.c b/nvme-topology.c
|
|
index 31cf7f9..47121e4 100644
|
|
--- a/nvme-topology.c
|
|
+++ b/nvme-topology.c
|
|
@@ -319,10 +319,8 @@ static int scan_ctrl(struct nvme_ctrl *c, char *p, __u32 ns_instance)
|
|
return ret;
|
|
|
|
fd = open(path, O_RDONLY);
|
|
- if (fd < 0) {
|
|
- fprintf(stderr, "Failed to open %s\n", path);
|
|
+ if (fd < 0)
|
|
goto free;
|
|
- }
|
|
|
|
ret = nvme_identify_ctrl(fd, &c->id);
|
|
if (ret < 0)
|
|
--
|
|
2.27.0
|
|
|