libnvme(9)
π libnvme(9) β the one and only, bestie
okay so this page is from libnvme's API manual, and it's literally all about one enum. one. enum. and honestly? it ate. it's the zone attributes info that lives inside a ZNS zone descriptor, and once you get it you'll be obsessed π¦
β¨ NAME β¨
enum nvme_zns_zai β the Zone Descriptor Data Structure's Zone Attributes Information, aka the little bitfield that tells you how badly the controller recommends you reset or finish a zone π₯
πΈ SYNOPSIS πΈ
enum nvme_zns_zai {
NVME_ZNS_ZAI_RZRTL_SHIFT ,
NVME_ZNS_ZAI_RZRTL_MASK ,
NVME_ZNS_ZAI_FZRTL_SHIFT ,
NVME_ZNS_ZAI_FZRTL_MASK ,
NVME_ZNS_ZAI_RTL_0 ,
NVME_ZNS_ZAI_RTL_1 ,
NVME_ZNS_ZAI_RTL_2 ,
NVME_ZNS_ZAI_RTL_3
};
like, that's it. that's the whole enum. no cap π«Ά (and yes, there's a lil blank line before the closing brace in the original, we're keeping the vibes exactly as they are π )
π Constants π
okay so these are the members, one by one, and each one is doing its own little job. no skipping, bestie β all eight, in order, periodt β
NVME_ZNS_ZAI_RZRTL_SHIFTβ the shift amount you use to pull the Reset Zone Recommended Time Limit (RZRTL for short, iykyk) out of thestruct nvme_zns_desc.zaifield. shift it, get the number, slay π«NVME_ZNS_ZAI_RZRTL_MASKβ the mask that gets you RZRTL from that samestruct nvme_zns_desc.zaifield. mask + shift = the classic duo, they're in their main character energy together πNVME_ZNS_ZAI_FZRTL_SHIFTβ shift amount to get the Finish Zone Recommended Time Limit (FZRTL) out of thestruct nvme_zns_desc.zaifield. yes it's the finish twin of the reset one, and yes it's iconic β¨NVME_ZNS_ZAI_FZRTL_MASKβ the mask that extracts FZRTL fromstruct nvme_zns_desc.zai. mask, shift, done. we love a predictable little bitfield π§NVME_ZNS_ZAI_RTL_0β Reset/Finish Recommended Limit (RRL/FRL). the base value, the level zero, the starting point of the recommendation ladder πNVME_ZNS_ZAI_RTL_1β Reset/Finish Recommended Limit 1 (RRL1/FRL1). one rung up, still chill πNVME_ZNS_ZAI_RTL_2β Reset/Finish Recommended Limit 2 (RRL2/FRL2). two rungs up, the controller is starting to give you a look πNVME_ZNS_ZAI_RTL_3β Reset/Finish Recommended Limit 3 (RRL3/FRL3). three rungs up, highest of the four, and honestly? time to listen to it π
ngl bestie, the whole point is: grabstruct nvme_zns_desc.zai, apply the right shift and mask pair for the limit you want (RZRTL or FZRTL), and compare it against theNVME_ZNS_ZAI_RTL_*values. that's the vibe check, that's the whole flow π
and that's the page!! π thanks for reading the whole thing, you're a real one π«Ά this was enum nvme_zns_zai from the libnvme(9) manual β the API manual, section 9, dated October 2026. go forth and reset/finish those zones responsibly, mwah π
β¨
π¦ 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