From: Alan Adamson <alan.adamson@oracle.com>
To: linux-nvme@lists.infradead.org
Cc: alan.adamson@oracle.com, kbusch@kernel.org, hch@lst.de, sagi@grimberg.me
Subject: [PATCH V4 0/1] nvme: Add verbose error logging
Date: Mon, 24 Jan 2022 10:51:43 -0800 [thread overview]
Message-ID: <20220124185144.53810-1-alan.adamson@oracle.com> (raw)
V4:
- Adding logging for admin commands.
- Display NVMe Command Opcode value rather than generic block opcode.
- Various other nits.
V3:
- Don't populate nvme_errors[] array with NULL strings.
V2:
- Change nvme_errors[] to a sparse array where the status is used as an index into the array.
- Change pr_err() to pr_err_ratelimited().
- By enabling CONFIG_NVME_VERBOSE_ERRORS, the verbose status error is displayed. If it is not
enabled, then a message will still be displayed, but without the verbose status.
- Remove call to nvme_error_status() when determining whether to call nvme_error_log(). Speeds
up the fast path just a bit.
This patch improves logging for NVMe errors. Currently, we only get a
a vague idea as to why commands fail since only the block layer status
is captured on error. This patch allows us to see why a command was failed
by the controller. This is very useful when debugging problems in the field.
An example of an improved logged error:
[ 183.333734] nvme0n1: Read(0x2) @ LBA 0, 1 blocks, Unrecovered Read Error (sct 0x2 / sc 0x81) DNR
[ 227.767945] nvme0: Activate Firmware(0x10), Invalid Field in Command (sct 0x0 / sc 0x2) DNR
Alan Adamson (1):
nvme: Add verbose error logging
drivers/nvme/host/Kconfig | 8 ++
drivers/nvme/host/Makefile | 2 +-
drivers/nvme/host/core.c | 3 +
drivers/nvme/host/errors.c | 230 +++++++++++++++++++++++++++++++++++++
drivers/nvme/host/nvme.h | 2 +
include/linux/nvme.h | 1 +
6 files changed, 245 insertions(+), 1 deletion(-)
create mode 100644 drivers/nvme/host/errors.c
--
2.27.0
next reply other threads:[~2022-01-24 19:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-24 18:51 Alan Adamson [this message]
2022-01-24 18:51 ` [PATCH V4 1/1] nvme: Add verbose error logging Alan Adamson
2022-01-24 20:20 ` Keith Busch
2022-01-24 21:22 ` Alan Adamson
2022-01-25 10:02 ` Sagi Grimberg
[not found] ` <BB566CE6-19C1-472F-978B-564A2EC4C4EC@oracle.com>
2022-01-25 22:54 ` Sagi Grimberg
2022-01-25 23:18 ` Alan Adamson
2022-01-28 16:40 ` Hannes Reinecke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220124185144.53810-1-alan.adamson@oracle.com \
--to=alan.adamson@oracle.com \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox