libnvme(2)

✨ NAME ✨

enum nvme_id_ns_flbas β€” bestie, this whole field is just telling you the LBA data size & metadata size combination that the namespace has been formatted with πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

enum nvme_id_ns_flbas {
    NVME_NS_FLBAS_LOWER_MASK ,
    NVME_NS_FLBAS_META_EXT ,
    NVME_NS_FLBAS_HIGHER_MASK

};

okay so this is a little enum from the libnvme(2) API manual, and it's genuinely iconic for what it does. three constants, one job: decoding format vibes. let's go πŸ‘‘


πŸ’… Constants πŸ’…

  • NVME_NS_FLBAS_LOWER_MASK β€” this is the mask that grabs you the index of one of the supported LBA Formats's least significant 4bits, the ones living in struct nvme_id_ns.lbaf. so yes, four whole bits, slaying in the low end 🌸
  • NVME_NS_FLBAS_META_EXT β€” read carefully bestie, this one is applicable only if format contains metadata. if this bit is set, it means the metadata is transferred at the end of the data LBA, which creates an extended data LBA ✨ if it's cleared, then all of the metadata for a command is transferred as a separate contiguous buffer of data. two totally different shipping routes for your metadata, no cap πŸ“¦
  • NVME_NS_FLBAS_HIGHER_MASK β€” and this mask gets you the index of one of the supported LBA Formats's most significant 2bits, indicated in struct nvme_id_ns.lbaf. the top-shelf bits, the main character bits πŸ’…
ngl the whole point of nvme_id_ns_flbas is squishing an LBA format index into the field β€” 4 bits down low, 2 bits up high, plus one flag bit for metadata placement. vibe check passed 🫢

and that's the page, bestie πŸŽ€ this was enum nvme_id_ns_flbas from the libnvme(2) manual, dated July 2026 β€” go forth and decode your namespaces, ily, periodt πŸ’œπŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from