libnvme(9)
π libnvme β enum nvme_id_ns_kpios π
okay bestie, welcome to the libnvme manual, section 9 π this one's a little baby page but it's iconic in its own way, i promise.
β¨ NAME β¨
enum nvme_id_ns_kpios β Key Per I/O Status π (yes that's the whole name, she's efficient)
πΈ SYNOPSIS πΈ
here's the whole vibe, literally the entire struct, no cap:
enum nvme_id_ns_kpios {
NVME_NS_KPIOS_KPIOENS_SHIFT ,
NVME_NS_KPIOS_KPIOENS_MASK ,
NVME_NS_KPIOS_KPIOSNS_SHIFT ,
NVME_NS_KPIOS_KPIOSNS_MASK
};
that's it. four constants. she's compact. we stan a low-overhead enum π
π¦ Constants π¦
okay so each of these is a little helper for pulling info out of one specific field β the kpios field inside struct nvme_id_ns. like, the field is one thing, but there's two facts hiding in it, and you gotta shift and mask to get 'em out. very "there are two wolves inside you" energy fr fr πΊβ¨
NVME_NS_KPIOS_KPIOENS_SHIFTβ the shift amount you use to get Key Per I/O Enabled in Namespace out of thestruct nvme_id_ns.kpiosfield. slide those bits on over, bestie β‘οΈNVME_NS_KPIOS_KPIOENS_MASKβ the mask you use to get Key Per I/O Enabled in Namespace out of thestruct nvme_id_ns.kpiosfield. shift first, then mask, that's the combo π―NVME_NS_KPIOS_KPIOSNS_SHIFTβ the shift amount you use to get Key Per I/O Supported in Namespace out of thestruct nvme_id_ns.kpiosfield. different fact, same field, lowkey magical πNVME_NS_KPIOS_KPIOSNS_MASKβ the mask you use to get Key Per I/O Supported in Namespace out of thestruct nvme_id_ns.kpiosfield. the mask that finishes the job π«Ά
little reminder: Enabled and Supported are two separate bits living in the samekpiosfield β don't mix up yourKPIOENSand yourKPIOSNS, the names are one letter apart and that's genuinely so rude of them π
and that's the page!! short, sweet, entirely about bit-shifting, which is honestly the most main-character thing a field can be π
sign-off time π this beauty dropped in October 2026, it's the enum nvme_id_ns_kpios page, and it lives in the libnvme manual, section 9. go forth and mask 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