libnvme(9)

πŸ“¦ version 3.2, in arch rolling

πŸ’… NAME

enum nvme_status_result β€” the vibe check for your device self-test, aka the Result of the device self-test operation ✨

Bestie, this is the little enum that tells you how your device self-test went. Did it slay? Did it flop? Did it get unalived mid-test by a reset? All the answers live here πŸŽ€


🌸 SYNOPSIS

enum nvme_status_result {
    NVME_ST_RESULT_NO_ERR ,
    NVME_ST_RESULT_ABORTED ,
    NVME_ST_RESULT_CLR ,
    NVME_ST_RESULT_NS_REMOVED ,
    NVME_ST_RESULT_ABORTED_FORMAT ,
    NVME_ST_RESULT_FATAL_ERR ,
    NVME_ST_RESULT_UNKNOWN_SEG_FAIL ,
    NVME_ST_RESULT_KNOWN_SEG_FAIL ,
    NVME_ST_RESULT_ABORTED_UNKNOWN ,
    NVME_ST_RESULT_ABORTED_SANITIZE ,
    NVME_ST_RESULT_NOT_USED ,
    NVME_ST_RESULT_SHIFT ,
    NVME_ST_RESULT_MASK

};

πŸ‘‘ CONSTANTS

Okay so here's the whole roster, no skips, fr fr:

  • NVME_ST_RESULT_NO_ERR β€” the main character moment πŸ’– Operation completed without error. Literally the dream.
  • NVME_ST_RESULT_ABORTED β€” Operation was aborted by a Device Self-test command. Not me getting canceled by my own command 😭
  • NVME_ST_RESULT_CLR β€” Operation was aborted by a Controller Level Reset. The reset said "nope, we're done here" πŸ’€
  • NVME_ST_RESULT_NS_REMOVED β€” Operation was aborted due to a removal of a namespace from the namespace inventory. The namespace literally left the chat πŸ¦‹
  • NVME_ST_RESULT_ABORTED_FORMAT β€” Operation was aborted due to the processing of a Format NVM command. Format came in and ate πŸ“
  • NVME_ST_RESULT_FATAL_ERR β€” A fatal error or unknown test error occurred while the controller was executing the device self-test operation and the operation did not complete. Yeah… that's a red flag bestie πŸ”₯ not iconic at all.
  • NVME_ST_RESULT_UNKNOWN_SEG_FAIL β€” Operation completed with a segment that failed and the segment that failed is not known. It flopped, but we don't know which part flopped πŸ™ˆ mysterious behavior honestly.
  • NVME_ST_RESULT_KNOWN_SEG_FAIL β€” Operation completed with one or more failed segments and the first segment that failed is indicated in the Segment Number field. At least we got receipts ✨ go check the Segment Number field, iykyk.
  • NVME_ST_RESULT_ABORTED_UNKNOWN β€” Operation was aborted for unknown reason. No explanation, just chaos πŸ’€
  • NVME_ST_RESULT_ABORTED_SANITIZE β€” Operation was aborted due to a sanitize operation. The sanitize said "excuse me, I'm busy" 🌈
  • NVME_ST_RESULT_NOT_USED β€” Entry not used (does not contain a test result). Empty slot, nothing to see here, move along πŸŽ€
  • NVME_ST_RESULT_SHIFT β€” Device self-test result shift. The shift, the shifter, the one who shifts 🧚
  • NVME_ST_RESULT_MASK β€” Mask to get the status result value from the struct nvme_st_result.dsts field. Use this to actually pull the value out of struct nvme_st_result.dsts β€” it's giving "unlock the lore" πŸ”‘

Lowkey the whole point: NVME_ST_RESULT_SHIFT and NVME_ST_RESULT_MASK are your tools for extracting the status result value out of the struct nvme_st_result.dsts field. That's literally what NVME_ST_RESULT_MASK is for, periodt.

✨ That's the whole page bestie, every constant accounted for, not one skipped πŸ’… October 2026, API Manual for libnvme, section 9 β€” catch you in the next man page, mwah πŸ«ΆπŸ’œ

πŸ“¦ where this page comes from