[PATCH V2 1/1] nvme: Add verbose error logging
Keith Busch
kbusch at kernel.org
Tue Jan 4 10:48:05 PST 2022
On Tue, Jan 04, 2022 at 06:18:27PM +0000, Alan Adamson wrote:
> > On Dec 27, 2021, at 8:07 AM, Keith Busch <kbusch at kernel.org> wrote:
> >
> > On Thu, Dec 23, 2021 at 01:57:26PM -0800, Alan Adamson wrote:
> >> +
> >> +static const char * const nvme_errors[] = {
> >> + "Success",
> >> + "Invalid Command Opcode",
> >> + "Invalid Field in Command",
> >> + "Command ID Conflict",
> >> + "Data Transfer Error",
> >> + "Commands Aborted due to Power Loss Notification",
> >> + "Internal Error",
> >> + "Command Abort Requested",
> >> + "Command Aborted due to SQ Deletion",
> >> + "Command Aborted due to Failed Fused Command",
> >> + "Command Aborted due to Missing Fused Command",
> >> + "Invalid Namespace or Format",
> >> + "Command Sequence Error",
> >> + "Invalid SGL Segment Descriptor",
> >> + "Invalid Number of SGL Descriptors",
> >> + "Data SGL Length Invalid",
> >> + "Metadata SGL Length Invalid",
> >> + "SGL Descriptor Type Invalid",
> >> + "Invalid Use of Controller Memory Buffer",
> >> + "PRP Offset Invalid",
> >> + "Atomic Write Unit Exceeded",
> >> + "Operation Denied",
> >> + "SGL Offset Invalid",
> >> + "Reserved",
> >> + "Host Identifier Inconsistent Format",
> >> + "Keep Alive Timeout Expired",
> >> + "Keep Alive Timeout Invalid",
> >> + "Command Aborted due to Preempt and Abort",
> >> + "Sanitize Failed",
> >> + "Sanitize In Progress",
> >> + "SGL Data Block Granularity Invalid",
> >> + "Command Not Supported for Queue in CMB",
> >> + "Namespace is Write Protected",
> >> + "Command Interrupted",
> >> + "Transient Transport Error",
> >> + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
> >
> > Tracking these NULL's is going to be problematic and error prone.
>
> I don’t disagree, definitely wasn’t fun putting them in there:)
>
> If we don’t define the NULLs, what happens if the hardware responds with a undefined error status?
> We will attempt to log a undefined/non-string.
Every index not defined below the maximum defined index is automatically
initialized to NULL.
More information about the Linux-nvme
mailing list