diff options
author | Alan Adamson <alan.adamson@oracle.com> | 2024-01-30 01:19:38 +0100 |
---|---|---|
committer | Keith Busch <kbusch@kernel.org> | 2024-02-01 16:44:53 +0100 |
commit | 9f079dda14339ee87d864306a9dc8c6b4e4da40b (patch) | |
tree | 863f8defadf2a10de11fd4280cd6e3173f6c944c /block/blk-mq.c | |
parent | nvme-fc: show hostnqn when connecting to fc target (diff) | |
download | linux-9f079dda14339ee87d864306a9dc8c6b4e4da40b.tar.xz linux-9f079dda14339ee87d864306a9dc8c6b4e4da40b.zip |
nvme: allow passthru cmd error logging
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.
By default, passthrough error logging is disabled.
To enable passthrough admin error logging:
echo 1 > /sys/class/nvme/nvme0/passthru_err_log_enabled
To disable passthrough admin error logging:
echo 0 > /sys/class/nvme/nvme0/passthru_err_log_enabled
To enable passthrough io error logging:
echo 1 > /sys/class/nvme/nvme0/nvme0n1/passthru_err_log_enabled
To disable passthrough io error logging:
echo 0 > /sys/class/nvme/nvme0/nvme0n1/passthru_err_log_enabled
Signed-off-by: Alan Adamson <alan.adamson@oracle.com>
Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions