nvme_init_copy_range_f0(9)
π 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 passnr, she builds that many. Not one more, not one less. Periodt. π
Side note:nlbs,slbas,elbts,elbatms, andelbatsare all pointers, andcopyis 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
- 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