libnvme(9)

πŸ“¦ version 3.2, in arch rolling

πŸ’… 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 NSID FFFFFFFFh.
  • 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 NSID FFFFFFFFh.
  • 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 to FFFFFFFFh. If cleared, format supports nsid value set to FFFFFFFFh. read that twice, the set/cleared is lowkey flipped from what you'd expect πŸ™ˆ

πŸ’€ reminder bestie: If set and If cleared are 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