[PATCH V2] nvme: expose active quirks in sysfs

Chaitanya Kulkarni chaitanyak at nvidia.com
Mon Nov 17 17:46:45 PST 2025


On 11/17/25 14:12, John Meneghini wrote:
> Reviewed-by: John Meneghini <jmeneghi at redhat.com>
> Tested-by: John Meneghini <jmeneghi at redhat.com>
>
> Looks good to me. Testing this on my VM shows the correct quirk 
> information for both
>
>   -device nvme,use-intel-id=on and
>   -device nvme,use-intel-id=off
>
> root at target-vm:~# grep . /sys/class/nvme/nvme0/quirk* 
> /sys/class/nvme/nvme0/device/{vendor,device}
> /sys/class/nvme/nvme0/quirks:0x00040202
> /sys/class/nvme/nvme0/device/vendor:0x8086
> /sys/class/nvme/nvme0/device/device:0x5845
> root at target-vm:~# grep . /sys/class/nvme/nvme1/quirk* 
> /sys/class/nvme/nvme1/device/{vendor,device}
> /sys/class/nvme/nvme1/quirks:0x00040000
> /sys/class/nvme/nvme1/device/vendor:0x1b36
> /sys/class/nvme/nvme1/device/device:0x0010
>
> Keith, please merge this patch.
>
> /John
>
> On 11/3/25 9:44 AM, Maurizio Lombardi wrote:
>> Currently, there is no straightforward way for a user to inspect
>> which quirks are active for a given device from userspace.
>>
>> Add a new "quirks" sysfs attribute to the nvme controller device.
>>
>> Reading this file will display a human-readable list
>> of all active quirks, with each quirk name on a new line.
>> If no quirks are active, it will display "none".
>>
>> Signed-off-by: Maurizio Lombardi <mlombard at redhat.com>

It will be nice to merge this if there are no major objections.

-ck




More information about the Linux-nvme mailing list