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

Pankaj Raghav p.raghav at samsung.com
Wed Apr 12 02:10:13 PDT 2023


On Sun, Apr 09, 2023 at 02:25:37PM -0700, Chaitanya Kulkarni wrote:
> 
> -ck
> 
> Chaitanya Kulkarni (1):
>   nvme: allow passthru cme error logging
> 
>  drivers/nvme/host/core.c | 83 +++++++++++++++++++++++++++++++++++++---
>  drivers/nvme/host/nvme.h |  1 +
>  2 files changed, 79 insertions(+), 5 deletions(-)
> 
> v5:
> 
> - Trim down code in the nvme_log_error_passthrough().
>   Use following to get the disk name as an arg to
>    pr_err_ratelimited() :-
> 	ns ? ns->disk->disk_name : dev_name(nr->ctrl->device),
>   Use following to get the admin vs I/O opcode string as an arg to
>   pr_err_ratelimited() :-
>        	ns ? nvme_get_opcode_str(nr->cmd->common.opcode) :
>        	     nvme_get_admin_opcode_str(nr->cmd->common.opcode),
> - Rename nvme_log_error_passthrough() -> nvme_log_err_passthru().
> - Remove else and return directly in nvme_passthru_err_log_show().
> - Generate error on invalid values of the passthru_enable variable
>   in nvme_passthru_log_store().
> - Rename passthrough -> passthru.

> - Rename sysfs attr from passthru_admin_err_logging -> passthru_log_err.
Curious to know why `admin` was removed from the sysfs attr. We enable
logging for admin commands using this attr but IO errors are always logged.

I tried out the patch and I was surprised to see IO err was logged for
passthru requests without me enabling it explicitly. Having the sysfs
attr to be passthru_log_admin_err would have been more clear IMO.


More information about the Linux-nvme mailing list