]> www.infradead.org Git - users/sagi/libnvme.git/commit
tree: do not issue an error when subsys lookup fails during scanning
authorDaniel Wagner <dwagner@suse.de>
Tue, 6 Feb 2024 13:06:10 +0000 (14:06 +0100)
committerDaniel Wagner <wagi@monom.org>
Wed, 7 Feb 2024 11:26:57 +0000 (12:26 +0100)
commit3f89041df7727a488e2e65485aee7ee047b2bc7b
tree37ead64427240de3a94686997f5a703699512475
parentb96f23e285041f80a74f3b1a406afd6d068fce09
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 <dwagner@suse.de>
src/nvme/tree.c