Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tree: read all attributes from sysfs when available #754

Merged
merged 2 commits into from
Dec 19, 2023

Conversation

igaw
Copy link
Collaborator

@igaw igaw commented Dec 7, 2023

The kernel already exposes parts or all attributes we are looking up
with the ns id command. By reading these from the sysfs we can remove
the last command we are issuing during the topology scan.

Depends on: https://lore.kernel.org/linux-nvme/[email protected]/

Fixes: #681 #550

src/nvme/tree.c Outdated Show resolved Hide resolved
src/nvme/tree.c Outdated Show resolved Hide resolved
igaw added 2 commits December 19, 2023 09:28
The kernel already exposes parts or all attributes we are looking up
with the ns id command. By reading these from the sysfs we can remove
the last command we are issuing during the topology scan.

Signed-off-by: Daniel Wagner <[email protected]>
The fd is not needed anymore if the kernel exposes all necessary sysfs
entries to fully scan the nvme subsystem. Thus do not alwyas open the
blk device and do it only when necessary.

Signed-off-by: Daniel Wagner <[email protected]>
@igaw igaw marked this pull request as ready for review December 19, 2023 08:36
@igaw igaw merged commit 5224243 into linux-nvme:master Dec 19, 2023
14 checks passed
@igaw igaw deleted the tree-no-cmd branch December 19, 2023 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not issue commands when scaning sysfs
3 participants