libnvme(2)
π libnvme β API Manual, section 2 π
okay bestie, welcome to libnvme's manual page, section 2, and today's main character is literally one little enum. yes, an enum. and no, I'm not being dramatic β it's giving "quietly runs your entire NVMe format situation" energy. let's get into it π
β¨ NAME β¨
enum nvme_flbas β this field indicates the formatted LBA size π¦
like. that's the whole vibe. the FLBAS field. it's the one telling you what LBA size you're formatted to. iconic behavior fr fr.
πΈ SYNOPSIS πΈ
enum nvme_flbas {
NVME_FLBAS_LOWER_SHIFT ,
NVME_FLBAS_META_EXT_SHIFT ,
NVME_FLBAS_HIGHER_SHIFT ,
NVME_FLBAS_LOWER_MASK ,
NVME_FLBAS_META_EXT_MASK ,
NVME_FLBAS_HIGHER_MASK
};
six entries. three shifts, three masks. that's it, that's the whole enum, and honestly? slay. π
β Constants β
bestie, this is where the lore lives. each one of these is a shift amount or a mask for pulling apart the FLBAS field, so let me break them down one by one like the devoted bestie I am π«Ά
NVME_FLBAS_LOWER_SHIFTβ the shift amount you use to get the format index's least significant 4 bits πNVME_FLBAS_META_EXT_SHIFTβ the shift amount to get the metadata transferred β¨NVME_FLBAS_HIGHER_SHIFTβ the shift amount to get the format index's most significant 2 bits πNVME_FLBAS_LOWER_MASKβ the mask to get the format index's least significant 4 bits πNVME_FLBAS_META_EXT_MASKβ the mask to get the metadata transferred πΈNVME_FLBAS_HIGHER_MASKβ the mask to get the format index's most significant 2 bits π
so if you ever forget: the format index is literally split across two spots βLOWER(the bottom 4 bits) andHIGHER(the top 2 bits) β andMETA_EXTis doing its own little thing about metadata transferred. mask it, shift it, boom, you're done. no cap. π₯
and that's the page!! thanks for reading my little enum TED talk, bestie π§π this was enum nvme_flbas out of libnvme(2), and this cutie dropped back in July 2026. go format something responsibly, mwah π
β¨
π¦ where this page comes from
- ubuntu stonking: libnvme-dev 1.16.2-1build1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms