-
Notifications
You must be signed in to change notification settings - Fork 697
nvme: make "nvme list" do not report an error when the modules are not loaded #2857
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
base: master
Are you sure you want to change the base?
Conversation
|
@igaw Hi Daniel,please help me review this patch. |
are not loaded On nvme-cli 1.x, "nvme list" is no-ops when the nvme_core module isn't loaded. But on nvme-cli 2.x, it fails when trying to open the nonexistent /sys/class/nvme. It would be better if 2.x behaved the same way. Signed-off-by: Kou Wenqi <kouwenqi@kylinos.cn>
|
The commit message should contain the reason why this change is necessary. And given the amount of time this exact code has been touched by either someone complaining it should print a warning or not I have the suspicion this is going to cause another discussion. |
Thank you for your review. I have revised the commit message; kindly take another look. To ensure consistency, it would be better if the behavior of "nvme list" in version 2.x matched that of version 1.x when the NVMe modules are not loaded. |
|
I have to dig into it again. But one thing is, that I am extremely hesitant to change the behavior 3 years after we have released 2.x. |
|
I'll look into it after the v2.15 release. Just not enough time to dive into this topic right now. |
|
<OT> Yeah, it's the kind of annoyance when user needs to modprobe manually. Similar situation with |
|
Please discuss this out with @martin-gpy who added this feature f17afe1 ("fabrics: print an error for ENOENT too") Obviously, you can't have both. |
|
One idea I had was to make the default failing silent, that is if you just do a |
That's still not ideal. A default silent failing only compounds the confusion as to why it has failed, and it is not intuitive to run it with the verbose option to see the actual failure message. |
|
I don't understand why ENOENT alone has to be treated as a no-ops unlike other errors. A no-ops serves no purpose but only to confuse further as to why it failed. Agreed we are using a generic error message here, but that applies to all errors and not just ENOENT. Can someone explain why ENOENT alone has to be treated separately (as a no-ops) unlike other errors here? What is so special about ENOENT? |
On nvme-cli 1.x, nvme list is no-ops when the nvme_core module isn't loaded:
But on nvme-cli 2.x, it fails when trying to open the nonexistent /sys/class/nvme. It would be nice for the command to be no-ops again.
commit 283585a fixes the issue, but commit f17afe1 reverts the change.