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

Pankaj Raghav p.raghav at samsung.com
Fri Mar 17 01:52:57 PDT 2023


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;
}
> +	nvme_error_logging_init(&ctrl->debugfs);
> +
>  	nvme_mpath_init_ctrl(ctrl);
>  	ret = nvme_auth_init_ctrl(ctrl);
>  	if (ret)
> +#ifdef CONFIG_NVME_ERROR_LOGGING_DEBUG_FS
> +void nvme_error_logging_init(struct nvme_debugfs *debugfs);
> +#else
> +static inline void nvme_error_logging_init(struct nvme_debugfs *debugfs)
> +{
> +}
> +#endif /* CONFIG_NVME_ERROR_LOGGING_DEBUG_FS */



More information about the Linux-nvme mailing list