Skip to content

Conversation

@igaw
Copy link
Collaborator

@igaw igaw commented Dec 11, 2025

Older kernels do not expose the sysfs entries the library needs. In this in this case it falls back to use a command to fetch the missing data. Though, the transport handle is not available yet. Open an temporary one. No need to optimize this code path, it is only for older kernels.

Fixes: #3009

TODO: The tree API needs to be extended with the nvme_global_ctx argument

Older kernels do not expose the sysfs entries the library needs. In this
in this case it falls back to use a command to fetch the missing data.
Though, the transport handle is not available yet. Open an temporary
one. No need to optimize this code path, it is only for older kernels.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
ret = nvme_ns_identify(ns, id);
ret = nvme_open(ctx, ns->name, &hdl);
if (ret) {
nvme_msg(ctx, LOG_ERR, "need root permissions");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs \n at the end of the message string.

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.

2 participants