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

alan.adamson at oracle.com alan.adamson at oracle.com
Wed Mar 22 16:06:24 PDT 2023


On 3/17/23 1:52 AM, Pankaj Raghav wrote:
> On Thu, Mar 16, 2023 at 04:49:58PM -0700, Alan Adamson wrote:
>>   
>> @@ -5183,6 +5188,10 @@ int nvme_init_ctrl(struct nvme_ctrl *ctrl, struct device *dev,
>>   
>>   	nvme_debugfs_init(&ctrl->debugfs, dev_name(ctrl->device));
>>   	nvme_fault_inject_init(&ctrl->debugfs);
>> +
>> +	ctrl->debugfs.error_logging = false;
> Can we wrap the above statement into nvme_error_logging_init function?
> static inline void nvme_error_logging_init(struct nvme_debugfs *debugfs)
> {
> 	debugfs->error_logging = false;
> }

Since the error_logging flag is being used outside the debugfs 
environment, it will need to be initialized to false even if Pass 
Through errors is not configured.  I will move the flag to the nvme_ctrl.

Thanks,

Alan




More information about the Linux-nvme mailing list