nvme_init_write_zeros(9)

πŸ“¦ version 3.2, in arch rolling

🌸 NAME 🌸

okay bestie, welcome to the libnvme API manual entry for nvme_init_write_zeros β€” and the vibe is literally: initialize passthru command for a write zeroes command. periodt. πŸ’…βœ¨

✨ SYNOPSIS ✨

here's the exact signature, no cap β€” copy it character for character:

void nvme_init_write_zeros (struct libnvme_passthru_cmd *cmd , __u32
       nsid , __u64 slba , __u16 nlb , __u16 control , __u16 dspec , __u8 dsm ,
       __u8 cev );

πŸŽ€ ARGUMENTS πŸŽ€

okay so these are the little besties you pass in:

  • cmd β€” Passthru command to use. This is the command buffer getting the glow-up. 🫢
  • nsid β€” Namespace ID. iconic namespace behavior, honestly.
  • slba β€” Starting logical block. that's where the party starts. ✨
  • nlb β€” Number of logical blocks (0-based). yes bestie, zero-based, keep up. πŸ’…
  • control β€” Upper 16 bits of cdw12. highkey important bits.
  • dspec β€” Directive specific value. it's giving very specific directive energy.
  • dsm β€” Data set management attributes (CETYPE is zero), see enum nvme_io_dsm_flags. so when CETYPE is zero, this is your dsm bestie. πŸ¦‹
  • cev β€” Command Extension Value (CETYPE is non-zero). and when CETYPE is non-zero, this is the one. 🌈

πŸ’… DESCRIPTION πŸ’…

Initializes the passthru command buffer for the Write Zeroes command. That's it. That's the whole main character energy: you hand it the cmd buffer plus all the fields above, and it gets the passthru command buffer ready for Write Zeroes. slay. πŸ”₯

⭐ NOTE ⭐

bestie, important vibe check: the Write Zeroes command does not transfer data or metadata. not a single byte of data, not a single byte of metadata. not me double-checking that. πŸ˜­πŸ’€

mwah πŸ’‹ β€” source/version: libnvme API manual; date: October 2026; page: nvme_init_write_zeros(9). bye bestie, go initialize those write zeroes commands! 🫢✨

πŸ“¦ where this page comes from