libnvme(9)
π libnvme(9) β enum nvme_id_ctrl_fna
okay so bestie, this is a page straight out of the libnvme API Manual (section 9, we love a kernel-adjacent moment) β¨ and it's all about one little enum that literally just holds the constants for the FNA field, which is the field that tells you all the attributes for the Format NVM command. no cap, that's the whole vibe. let's get into it π
β¨ NAME β¨
enum nvme_id_ctrl_fna β This field indicates attributes for the Format NVM command.
π¦ SYNOPSIS π¦
enum nvme_id_ctrl_fna {
NVME_CTRL_FNA_FMT_ALL_NS_SHIFT ,
NVME_CTRL_FNA_SEC_ALL_NS_SHIFT ,
NVME_CTRL_FNA_CES_SHIFT ,
NVME_CTRL_FNA_NSID_ALL_F_SHIFT ,
NVME_CTRL_FNA_FMT_ALL_NS_MASK ,
NVME_CTRL_FNA_SEC_ALL_NS_MASK ,
NVME_CTRL_FNA_CES_MASK ,
NVME_CTRL_FNA_NSID_ALL_F_MASK ,
NVME_CTRL_FNA_FMT_ALL_NAMESPACES ,
NVME_CTRL_FNA_SEC_ALL_NAMESPACES ,
NVME_CTRL_FNA_CRYPTO_ERASE ,
NVME_CTRL_FNA_NSID_FFFFFFFF
};
πΈ Constants πΈ
like, every single one of them, bestie β no skipping, we're thorough here π
NVME_CTRL_FNA_FMT_ALL_NS_SHIFTβ Shift amount to get the format applied to all namespaces. it's giving "how far do I gotta slide over to find this bit" energy.NVME_CTRL_FNA_SEC_ALL_NS_SHIFTβ Shift amount to get the secure erase applied to all namespaces.NVME_CTRL_FNA_CES_SHIFTβ Shift amount to get the cryptographic erase supported.NVME_CTRL_FNA_NSID_ALL_F_SHIFTβ Shift amount to get the format supported an NSIDFFFFFFFFh.NVME_CTRL_FNA_FMT_ALL_NS_MASKβ Mask to get the format applied to all namespaces. masks are literally the main character of bit twiddling fr fr.NVME_CTRL_FNA_SEC_ALL_NS_MASKβ Mask to get the secure erase applied to all namespaces.NVME_CTRL_FNA_CES_MASKβ Mask to get the cryptographic erase supported.NVME_CTRL_FNA_NSID_ALL_F_MASKβ Mask to get the format supported an NSIDFFFFFFFFh.NVME_CTRL_FNA_FMT_ALL_NAMESPACESβ If set, then all namespaces in an NVM subsystem shall be configured with the same attributes and a format (excluding secure erase) of any namespace results in a format of all namespaces in an NVM subsystem. If cleared, then the controller supports format on a per namespace basis. π«Ά so it's like "all for one" vs "every namespace for itself", iconic either way.NVME_CTRL_FNA_SEC_ALL_NAMESPACESβ If set, then any secure erase performed as part of a format operation results in a secure erase of all namespaces in the NVM subsystem. If cleared, then any secure erase performed as part of a format results in a secure erase of the particular namespace specified. ngl that's a pretty big difference, pay attention bestie πNVME_CTRL_FNA_CRYPTO_ERASEβ If set, then cryptographic erase is supported. If cleared, then cryptographic erase is not supported. simple as that, periodt.NVME_CTRL_FNA_NSID_FFFFFFFFβ If set, then format does not support nsid value set toFFFFFFFFh. If cleared, format supports nsid value set toFFFFFFFFh. read that twice, the set/cleared is lowkey flipped from what you'd expect π
π reminder bestie:If setandIf clearedare doing very different things in these descriptions β don't mix them up, or your namespace is gonna have a bad time.
and that's the whole page!! π from the October 2026 drop of the enum nvme_id_ctrl_fna page in the libnvme(9) API Manual β mwah, go format something responsibly πβ¨π
π¦ 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