nvme_init_copy_range_f0(9)

πŸ“¦ version 3.2, in arch rolling

πŸ’… nvme_init_copy_range_f0 β€” bestie's guide to the copy range constructor

Okay so picture this: you're in the libnvme API manual, and there's a little function called nvme_init_copy_range_f0 whose whole entire job is Constructs a copy range structure. That's it. That's the plot. It fills in a struct nvme_copy_range_f0 for you so you don't have to hand-write every field like some kind of Victorian orphan. Iconic, honestly. πŸŽ€


✨ SYNOPSIS ✨

void nvme_init_copy_range_f0 (struct nvme_copy_range_f0 *copy , __u16
*nlbs , __u64 *slbas , __u32 *elbts , __u16 *elbatms , __u16 *elbats ,
__u16 nr );

No return value, she just does the thing and leaves. Main character energy fr. πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

Girl, there are seven of these, so buckle up β€” every single one matters:

  • copy β€” Copy range array. This is the array she's gonna write into, bestie. The destination of the whole vibe. ✨
  • nlbs β€” Number of logical blocks. Like, how many blocks each range covers.
  • slbas β€” Starting LBA. Where each range begins, for real for real.
  • elbts β€” Expected initial logical block reference tag.
  • elbatms β€” Expected logical block application tag mask.
  • elbats β€” Expected logical block application tag.
  • nr β€” Number of descriptors to construct. So if you pass nr, she builds that many. Not one more, not one less. Periodt. πŸ‘‘
Side note: nlbs, slbas, elbts, elbatms, and elbats are all pointers, and copy is a pointer too β€” so this is one of those "you hand her arrays and she zips them into the struct array" situations. Don't come for me, I didn't write it, I just think it's neat. 🫢

🌸 little sign-off 🌸

This lil' page lives in the libnvme API manual and it's dated October 2026 β€” so go forth, construct those copy ranges, and remember: the way that nvme_init_copy_range_f0 just fills in your descriptors? Obsessed. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from