Skip to content

Commit 3f89041

Browse files
dwsuseigaw
authored andcommitted
tree: do not issue an error when subsys lookup fails during scanning
The scan operation is not atomically done and the sysfs might change while we are iterating over it. Thus, it's possible that we find a controller but when we try to lookup the corresponding subsystem it might already destroyed and removed. This error makes blktests fail because it finds controllers controller which are not under control of blktests, instead they are created and destroyed by the udev auto connect rules. These resources appear and disappear while the test runs but when we scan sysfs we issue errors for unrelated resources. Thus just do not issue a error, turn this into debug log message. Anyway, we already do just return error codes for other reason in this function anyway without logging. Signed-off-by: Daniel Wagner <[email protected]>
1 parent b96f23e commit 3f89041

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/nvme/tree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2010,7 +2010,7 @@ nvme_ctrl_t nvme_scan_ctrl(nvme_root_t r, const char *name)
20102010
}
20112011
subsysname = nvme_ctrl_lookup_subsystem_name(r, name);
20122012
if (!subsysname) {
2013-
nvme_msg(r, LOG_ERR,
2013+
nvme_msg(r, LOG_DEBUG,
20142014
"failed to lookup subsystem for controller %s\n",
20152015
name);
20162016
errno = ENXIO;

0 commit comments

Comments
 (0)