[RFC v2 1/3] nvme: move fault injector to nvme-debugfs.c

Sagi Grimberg sagi at grimberg.me
Tue Mar 28 01:53:17 PDT 2023


>> Move the nvme fault injector code associated with debugfs into
>> nvme-debugfs.c (new file) so all nvme debugfs associated can
>> reside in a common place.
>>
>> CONFIG_NVME_FAULT_INJECTION_DEBUG_FS needs to be enabled to
>> be able to use fault injection.
> 
> It feels a bit pointless to me to have a separate file for what
> even with the next patch is way under 100 lines of code.
> 
> Keith, Sagi, any opinion?

If we add stuff to debugfs other than fault injection, maybe the
file is better off called debugfs.c instead of fault_inject.c

In that case we can have nvme_debugfs_init(ns)/nvme_debugfs_fini that
would do what it needs based on config opts (fault_inject and
error_logging).

I don't see why we need a separate CONFIG_NVME_FAULT_INJECTION_DEBUG_FS
though...



More information about the Linux-nvme mailing list