All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 0/1] nvme: Add verbose error logging
@ 2021-12-23 21:57 Alan Adamson
  2021-12-23 21:57 ` [PATCH V2 1/1] " Alan Adamson
  0 siblings, 1 reply; 6+ messages in thread
From: Alan Adamson @ 2021-12-23 21:57 UTC (permalink / raw)
  To: linux-nvme; +Cc: alan.adamson, kbusch, hch, sagi

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:

[ 4652.812867] nvme0n1: Read @ LBA 1536, 1 blocks, Unrecovered Read Error (sct 0x2 / sc 0x81) 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 | 202 +++++++++++++++++++++++++++++++++++++
 drivers/nvme/host/nvme.h   |   2 +
 include/linux/nvme.h       |   1 +
 6 files changed, 217 insertions(+), 1 deletion(-)
 create mode 100644 drivers/nvme/host/errors.c

-- 
2.27.0



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-01-17 13:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-23 21:57 [PATCH V2 0/1] nvme: Add verbose error logging Alan Adamson
2021-12-23 21:57 ` [PATCH V2 1/1] " Alan Adamson
2021-12-27 16:07   ` Keith Busch
2022-01-04 18:18     ` Alan Adamson
2022-01-04 18:48       ` Keith Busch
2022-01-17 13:52   ` Hannes Reinecke

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.