libnvme(9)

πŸ“¦ version 3.2, in arch rolling

✨ libnvme(9) β€” API Manual ✨

okay bestie, welcome to the libnvme API manual, this page is literally all about enum nvme_smart_crit πŸ’…


πŸŽ€ NAME πŸŽ€

enum nvme_smart_crit β€” Critical Warning, aka the vibe check your NVMe drive gives you when something is lowkey wrong πŸ‘€


πŸ¦‹ SYNOPSIS πŸ¦‹

Here's the whole enum, exactly as it lives, no cap:

enum nvme_smart_crit {
    NVME_SMART_CW_ASCBT_SHIFT ,
    NVME_SMART_CW_TTC_SHIFT ,
    NVME_SMART_CW_NDR_SHIFT ,
    NVME_SMART_CW_AMRO_SHIFT ,
    NVME_SMART_CW_VMBF_SHIFT ,
    NVME_SMART_CW_PMRRO_SHIFT ,
    NVME_SMART_CW_IPS_SHIFT ,
    NVME_SMART_CW_ASCBT_MASK ,
    NVME_SMART_CW_TTC_MASK ,
    NVME_SMART_CW_NDR_MASK ,
    NVME_SMART_CW_AMRO_MASK ,
    NVME_SMART_CW_VMBF_MASK ,
    NVME_SMART_CW_PMRRO_MASK ,
    NVME_SMART_CW_IPS_MASK ,
    NVME_SMART_CRIT_SPARE ,
    NVME_SMART_CRIT_TEMPERATURE ,
    NVME_SMART_CRIT_DEGRADED ,
    NVME_SMART_CRIT_MEDIA ,
    NVME_SMART_CRIT_VOLATILE_MEMORY ,
    NVME_SMART_CRIT_PMR_RO ,
    NVME_SMART_CRIT_INDETERMINATE_PERSONALITY

};

🌸 Constants 🌸

so there's basically three flavors here: the _SHIFT girlies (how far to shift to grab the bit), the _MASK girlies (the mask that pulls the bit out), and the NVME_SMART_CRIT_* icons (what it actually means when that bit is set). let's go πŸ’–

πŸ’« the _SHIFT constants πŸ’«

  • NVME_SMART_CW_ASCBT_SHIFT β€” the shift amount you use to get "the available spare capacity has fallen below the threshold" πŸ“
  • NVME_SMART_CW_TTC_SHIFT β€” the shift amount to get "the temperature is either greater than or equal to an over temperature threshold; or less than or equal to an under temperature threshold" β€” yes, both ends of the temperature spectrum, she's versatile 🌑️
  • NVME_SMART_CW_NDR_SHIFT β€” the shift amount to get "the NVM subsystem reliability has been degraded due to significant media related errors or any internal error that degrades NVM subsystem reliability" 😭
  • NVME_SMART_CW_AMRO_SHIFT β€” the shift amount to get "all of the media has been placed in read only mode". and bestie, important caveat: the controller shall not set this bit if the read-only condition on the media is a result of a change in the write protection state of a namespace πŸ”’
  • NVME_SMART_CW_VMBF_SHIFT β€” the shift amount to get "the volatile memory backup device has failed". this field is only valid if the controller has a volatile memory backup solution, so if it doesn't, don't come for her πŸ™ˆ
  • NVME_SMART_CW_PMRRO_SHIFT β€” the shift amount to get "the Persistent Memory Region has become read-only or unreliable" πŸ’€
  • NVME_SMART_CW_IPS_SHIFT β€” the shift amount to get the indeterminate Personality State 🧚

🌈 the _MASK constants 🌈

  • NVME_SMART_CW_ASCBT_MASK β€” if set, then the available spare capacity has fallen below the threshold πŸ“
  • NVME_SMART_CW_TTC_MASK β€” mask to get "the temperature is either greater than or equal to an over temperature threshold; or less than or equal to an under temperature threshold" 🌑️
  • NVME_SMART_CW_NDR_MASK β€” mask to get "the NVM subsystem reliability has been degraded due to significant media related errors or any internal error that degrades NVM subsystem reliability" 😭
  • NVME_SMART_CW_AMRO_MASK β€” mask to get "all of the media has been placed in read only mode". again, the controller shall not set this bit if the read-only condition on the media is a result of a change in the write protection state of a namespace πŸ”’
  • NVME_SMART_CW_VMBF_MASK β€” mask to get "the volatile memory backup device has failed". only valid if the controller has a volatile memory backup solution πŸ™ˆ
  • NVME_SMART_CW_PMRRO_MASK β€” mask to get "the Persistent Memory Region has become read-only or unreliable" πŸ’€
  • NVME_SMART_CW_IPS_MASK β€” mask to get the indeterminate Personality State 🧚

πŸ‘‘ the NVME_SMART_CRIT_* constants πŸ‘‘

these are the "if set, then…" icons β€” the actual meaning, main character energy only:

  • NVME_SMART_CRIT_SPARE β€” if set, then the available spare capacity has fallen below the threshold πŸ“
  • NVME_SMART_CRIT_TEMPERATURE β€” if set, then a temperature is either greater than or equal to an over temperature threshold; or less than or equal to an under temperature threshold 🌑️
  • NVME_SMART_CRIT_DEGRADED β€” if set, then the NVM subsystem reliability has been degraded due to significant media related errors or any internal error that degrades NVM subsystem reliability 😭
  • NVME_SMART_CRIT_MEDIA β€” if set, then all of the media has been placed in read only mode. the controller shall not set this bit if the read-only condition on the media is a result of a change in the write protection state of a namespace πŸ”’
  • NVME_SMART_CRIT_VOLATILE_MEMORY β€” if set, then the volatile memory backup device has failed. this field is only valid if the controller has a volatile memory backup solution πŸ™ˆ
  • NVME_SMART_CRIT_PMR_RO β€” if set, then the Persistent Memory Region has become read-only or unreliable πŸ’€
  • NVME_SMART_CRIT_INDETERMINATE_PERSONALITY β€” if set, then a requested change to the settings of a Configurable Device Personality did not complete successfully and the controller was not able to revert to the previous settings of that personality. like… she tried to glow up and couldn't even go back 😭🧚

ngl bestie, "shall not set this bit" is spec-speak for please don't blame the drive for your own namespace write-protection choices β€” that's the whole reason both the AMRO shift and mask carry that caveat πŸ’…

and that's the page! 🫢 this was enum nvme_smart_crit from the libnvme API Manual, dated October 2026 β€” mwah, go check your SMART data, ily, bye βœ¨πŸ’–πŸŽ€

πŸ“¦ where this page comes from