libnvme(9)
β¨ 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
- arch rolling: nvme-cli 3.2-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms