libnvme(2)
β¨ libnvme β struct nvme_error_log_page β¨
okay bestie, sit down, hydrate, and let me tell you about this little struct from the libnvme API manual π this is the one that holds one (1) single entry from the Error Information Log, aka Log Identifier 01h. she's the receipt for when something went wrong π§Ύπ
π NAME π
struct nvme_error_log_page β Error Information Log Entry (Log Identifier 01h). that's it, that's the girl π
πΈ SYNOPSIS πΈ
here's the shape of her, no cap, copy it exactly:
struct nvme_error_log_page {
__le64 error_count;
__le16 sqid;
__le16 cmdid;
__le16 status_field;
__le16 parm_error_location;
__le64 lba;
__le32 nsid;
__u8 vs;
__u8 trtype;
__u8 csi;
__u8 opcode;
__le64 cs;
__le16 trtype_spec_info;
__u8 rsvd[21];
__u8 log_page_version;
};
π¦ Members π¦
field by field, no skips, no shortcuts, we're doing the whole roster:
error_countβ Error Count: a 64-bit incrementing error count, and it's basically this error's unique identifier π she starts at1h, gets bumped up for every unique error log entry, and she stays that way across power off conditions (loyal fr). a value of0hmeans the entry is invalid β that's what shows up when entries got lost or when there are fewer errors than the maximum number of entries the controller supports. and if this field hitsFFFFFFFFh, then it shall be set to1hwhen incremented (yep, she rolls over to1h). β οΈ heads up though: prior to NVMe 1.4, processing of incrementing beyondFFFFFFFFhis unspecified β undefined behaviour era, we don't talk about it πsqidβ Submission Queue ID: the Submission Queue Identifier of the command this error info is associated with. if the error isn't specific to a particular command, this field shall be set toFFFFh.cmdidβ Command ID: the Command Identifier of the command the error is associated with. if the error isn't specific to a particular command, this field shall be set toFFFFh.status_fieldβ Bits 15-1: Status Field for the command that completed. if the error isn't specific to a particular command, this field reports the most applicable status value. Bit 0: Phase Tag β may indicate the Phase Tag posted for the command. two-for-one, she contains multitudes πparm_error_locationβ Parameter Error Location: the byte and bit of the command parameter the error is associated with, if applicable. if the parameter spans multiple bytes or bits, the location points at the first byte and bit of the parameter.- Bits 10-8: Bit in command that contained the error. Valid values are 0 to 7.
- Bits 7-0: Byte in command that contained the error. Valid values are 0 to 63.
lbaβ LBA: the first LBA that experienced the error condition, if applicable. the scene of the crime π΅οΈnsidβ Namespace: the NSID of the namespace the error is associated with, if applicable.vsβ Vendor Specific Information Available: if there's additional vendor specific error info available, this field provides the log page identifier associated with that page. a value of0hmeans no additional information is available. valid values are in the range of80htoFFh.trtypeβ Transport Type (TRTYPE): the Transport Type of the transport associated with the error. the values in this field are the same as the TRTYPE values in the Discovery Log Page Entry. if the error isn't transport related, this field shall be cleared to0h. if the error is transport related, this field shall be set to the type of the transport β seeenum nvme_trtype.csiβ Command Set Indicator: holds the command set indicator for the command the error is associated with.opcodeβ Opcode: holds the opcode for the command the error is associated with.csβ Command Specific Information: holds command specific information. if used, the command definition specifies the information returned.trtype_spec_infoβ Transport Type Specific Information. short and sweet, she said what she said β¨rsvdβ Reserved:[62:42]β do not touch, she's reserved, respect the boundary πlog_page_versionβ this field shall be set to1h. if it's set,csiandopcodewill have valid values. set it or lose the lore π₯
not me writing a whole struct biography bestie but likeβ¦ the details MATTER. setlog_page_versionto1horcsiandopcodeare just background characters, no cap π
okay that's the whole page, we ate and left no crumbs π mwah! this was struct nvme_error_log_page from the libnvme(2) API Manual, dated July 2026 β periodt, love u, go read your error logs bestie π«Άπ
π¦ where this page comes from
- ubuntu stonking: libnvme-dev 1.16.2-1build1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms