Re: [RFC v2 2/3] nvme: add error logging opt-in

Sagi Grimberg
2023-03-28T08:56:46Z

>> Commit d7ac8dca938c ("nvme: quiet user passthrough command errors") disabled error
>> logging for user passthrough commands. This commit adds the ability to opt-in
>> to passthrough error logging.
>>
>> To enable passthrough error logging:
>> echo 1 > /sys/kernel/debug/nvme0/error-logging
>>
>> To disable passthrough error logging:
>> echo 0 > /sys/kernel/debug/nvme0/error-logging
>>
>> By default, passthrough error logging will remain disabled.
>>
>> CONFIG_NVME_ERROR_LOGGING_DEBUG_FS needs to be enabled to
>> to enable passthrough error logging.
>
> Any reason to do this in debugfs vs sysfs which is someting
> that we can a handle too much more easily?
>
> Also why do we need a config option for a trivial mount of code?

I think it is because the fault_inject thing is dependent on a config.
But if we move fault injection to a debugfs init/fini we can hide
this stuff without a config option