[PATCH V8 1/1] nvme: allow passthru cmd error logging

alan.adamson at oracle.com alan.adamson at oracle.com
Tue Jan 23 09:11:32 PST 2024


>> This allows us to get the ctrl or ns object associated with the struct
>> device
>> we get in the sysfs, then based on the device class we update
>> logging_enabled
>> flags for either ctrl or ns respectively. In nvme_init_request() I use
>> ctrl->logging_enabled and ns->logging_enabled based on admin or io cmd.
>
> I was asking why should we have a show/store that operate on both ns and
> ctrl?
>
> Why not have a show/store in nvme_dev_attrs and a separate one in
> nvme_ns_id_attrs ? Then you don't need the awkward is_nvme_class() ?
> the ns attrs can access the ns in a normal way like the rest? Or am
> I missing something?

I did have a version that used nvme_ns_id_attrs but didn't think it was 
an appropriate place for it.  I can go back to that.

Alan




More information about the Linux-nvme mailing list