libnvme(9)

πŸ“¦ version 3.2, in arch rolling

πŸ’… libnvme(9) β€” the enum nvme_id_ctrl_nwpc moment

okay bestie, so this page comes to you straight out of the API Manual for libnvme(9) β€” section 9, kernel-adjacent, very much giving "I read specs for fun" energy. Today we're decoding one enum and like… it's about which write-protection vibes your NVMe controller can actually pull off. πŸŽ€


✨ NAME ✨

enum nvme_id_ctrl_nwpc β€” bestie, this field is literally the controller telling you which optional namespace write protection capabilities it supports. no cap, that's the whole plot. πŸ¦‹


🌈 SYNOPSIS 🌈

enum nvme_id_ctrl_nwpc {
    NVME_CTRL_NWPC_WRITE_PROTECT ,
    NVME_CTRL_NWPC_WRITE_PROTECT_POWER_CYCLE ,
    NVME_CTRL_NWPC_WRITE_PROTECT_PERMANENT

};

three constants, one enum, zero notes of hesitation. iconic behavior honestly. ✨


πŸ‘‘ Constants πŸ‘‘

  • NVME_CTRL_NWPC_WRITE_PROTECT β€” if this bit is set, then the controller shall support the No Write Protect and Write Protect namespace write protection states πŸ’– and it may support the Write Protect Until Power Cycle state and the Permanent Write Protect namespace write protection states. so like, "shall" for two of them, "may" for the other two β€” the wording is doing a lot of work here, bestie, don't skip it. 🫢
  • NVME_CTRL_NWPC_WRITE_PROTECT_POWER_CYCLE β€” if this bit is set, then the controller supports the Write Protect Until Power Cycle state. that's it. that's the whole bit. lowkey elegant. ⭐
  • NVME_CTRL_NWPC_WRITE_PROTECT_PERMANENT β€” if this bit is set, then the controller supports the Permanent Write Protect state. permanent. periodt. πŸ’€πŸ”₯
fr fr, everything in here is conditional on "if set" β€” you're checking capability bits, not commanding the controller to do anything. read the bits, respect the bits. πŸ’…

and that's the page, bestie β€” full send, no details left behind πŸ’œ

mwah πŸ’‹ β€” this has been API Manual, enum nvme_id_ctrl_nwpc, tagged libnvme(9), dated October 2026. go forth and write-protect responsibly. 🧚🌸

πŸ“¦ where this page comes from