-
Notifications
You must be signed in to change notification settings - Fork 696
nvme: allow mmap_registers from block device #2742
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
Conversation
|
If I read it correctly the change also implements the fallback for ns. Do we really need it:
|
|
If I understand right, The commit comment assume that /sys/class/nvme/nvme0n1 also exist? in kernel 6.1.4 |
|
if we do not want to lookup via the namespaces |
|
The documentation says:
Thus it's correct that these commands fail. I think it would be better to issue an info instead having this magic. |
To indicate that backward compatibility is not supported since we drop the block device fallback Signed-off-by: Steven Seungcheol Lee <[email protected]>
|
Good point, I just concerned about backward compatibility. After attempting to access the register via the fabric command and failing, I initially tried to check the block device and print an error message. However, I modified the implementation to allow only character devices, as intended by the documentation you mentioned. |
|
There will be some people which will be unhappy that it doesn't work with block devices anymore, but with the message in place that shouldn't be too hard to figure out what is happening. Thanks! |
When using the "effects-log" command in nvme-cli without specifying the "csi" argument, a default action is added to check the ctrl register, allowing only character devices like nvme0. In older versions of nvme-cli, the default value of csi was set to 0 and issued without any problems But it has been fixed now. It can be used regardless of the version when used as a character device. Reference: linux-nvme/nvme-cli#2742 Signed-off-by: Steven Seungcheol Lee <[email protected]>
The documentation says: The <device> parameter is mandatory and must be the nvme admin character device (ex: /dev/nvme0) Reference: linux-nvme/nvme-cli#2742 Signed-off-by: Steven Seungcheol Lee <[email protected]>
Below commands that use mmap_registers failed since a31081a (v2.9)
nvme show-regs /dev/nvme0n1
nvme effects-log /dev/nvme0n1