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

Keith Busch kbusch at kernel.org
Wed Jan 31 17:09:26 PST 2024


On Mon, Jan 29, 2024 at 04:19:38PM -0800, Alan Adamson wrote:
> 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 admin error logging. IO
> commands initiated as passthrough will always be logged.
> 
> The logging output for passthrough commands (Admin and IO) has been
> changed to include CDWXX fields.
> 
> nvme0n1: Read(0x2), LBA Out of Range (sct 0x0 / sc 0x80) DNR cdw10=0x0 cdw11=0x1
>         cdw12=0x70000 cdw13=0x0 cdw14=0x0 cdw15=0x0
> 
> Add a helper function nvme_log_err_passthru() which allows us to log
> error for passthru commands by decoding cdw10-cdw15 values of nvme
> command.
> 
> Add a new sysfs attr passthru_err_log_enabled that allows user to conditionally
> enable passthrough command logging for either passthrough Admin commands sent to
> the controller or passthrough IO commands sent to a namespace.

Thanks, applied to nvme-6.8 with Chaitanya's suggestion folded in.



More information about the Linux-nvme mailing list