Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks wrong. We should be able to get the smart log page data from a NVMe block device itself, right?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far I understand the specs, it says SMART is only for the controller not a namespace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. But I think it would be harsh if we restrict this command to char devices alone and not block devices as well, not to speak of the confusion this would generate in the field. And I believe there are multiple other areas in the code as well where the same issue exists. So we may have to be careful before enforcing such a check here.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is a result of a regression observed in blktests.
https://lore.kernel.org/linux-nvme/a25kumc6oyvzmr42jgowkf4yztmmiypxrvnygetwv6qvc2ol6b@tzhqqggcme3q/
If I read the spec right, then the block device is just wrong and it just worked because the devices are not checking the namespace identifier. If my understanding is correct I have no problem in breaking existing users. Or at least introduce a warning for nvme-cli 2.x and kill it for nvme-cli 3.x
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, I stopped reading too early. The spec says: