Skip to content

tree: fix nvme_subsystem_scan_namespaces() return handling#1105

Merged
igaw merged 1 commit intolinux-nvme:masterfrom
igaw:fix
Apr 30, 2026
Merged

tree: fix nvme_subsystem_scan_namespaces() return handling#1105
igaw merged 1 commit intolinux-nvme:masterfrom
igaw:fix

Conversation

@igaw
Copy link
Copy Markdown
Collaborator

@igaw igaw commented Apr 30, 2026

nvme list-subsys with the -vv option currently displays the following:

scan controller nvme0
lookup subsystem /sys/class/nvme-subsystem/nvme-subsys0/nvme0 scan controller nvme0 path nvme0c0n1
scan subsystem nvme-subsys0
scan subsystem nvme-subsys0 namespace nvme0n1
failed to scan subsystem nvme-subsys0: Invalid argument ...

The invalid argument seen above is due to the wrong return handling of nvme_subsystem_scan_namespaces() in nvme_scan_subsystem(). Fix the same.

(upstream nvme-cli commit 8a4df2bc2c66ac403b11902708aec622fa07bf0e)

Fixes: #1104

nvme list-subsys with the -vv option currently displays the following:

scan controller nvme0
lookup subsystem /sys/class/nvme-subsystem/nvme-subsys0/nvme0
scan controller nvme0 path nvme0c0n1
scan subsystem nvme-subsys0
scan subsystem nvme-subsys0 namespace nvme0n1
failed to scan subsystem nvme-subsys0: Invalid argument
...

The invalid argument seen above is due to the wrong return handling
of nvme_subsystem_scan_namespaces() in nvme_scan_subsystem().
Fix the same.

Signed-off-by: Martin George <marting@netapp.com>
(upstream nvme-cli commit 8a4df2bc2c66ac403b11902708aec622fa07bf0e)
Signed-off-by: Daniel Wagner <wagi@kernel.org>
@igaw igaw merged commit 01116ad into linux-nvme:master Apr 30, 2026
12 checks passed
@igaw igaw deleted the fix branch April 30, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Potentially incorrection negation for nvme_subsystem_scan_namespaces in tree.c

2 participants