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