libnvme(9)

πŸ’– libnvme(9) β€” API Manual πŸ’–

okay bestie, so you're reading the manual page for libnvme, the NVMe library, and this specific little corner of it is all about struct nvme_copy_args β€” literally the arguments for the NVMe Copy command. no cap. it's giving "here's everything you need to hand the kernel so it can copy a bunch of blocks from one place to another" and honestly? iconic. ✨


🌸 NAME 🌸

struct nvme_copy_args β€” Arguments for the NVMe Copy command 🫢


✨ SYNOPSIS ✨

struct nvme_copy_args {
    __u64 sdlba;
    __u32 *result;
    struct nvme_copy_range *copy;
    int args_size;
    int fd;
    __u32 timeout;
    __u32 nsid;
    __u32 ilbrt;
    int lr;
    int fua;
    __u16 nr;
    __u16 dspec;
    __u16 lbatm;
    __u16 lbat;
    __u8 prinfor;
    __u8 prinfow;
    __u8 dtype;
    __u8 format;
    __u64 ilbrt_u64;
 };

like, that's the whole shape of it. every field, exactly as it lives in memory. don't touch the layout, she's perfect as she is. πŸ’…


πŸ‘‘ Members πŸ‘‘

okay so let's go field by field because every single one of these matters, fr fr:

  • sdlba β€” Start destination LBA. this is where the copy lands, bestie. the destination logical block address. 🎯
  • result β€” The command completion result from CQE dword0. yep, the juicy little answer the hardware hands back in that completion queue entry. πŸ‘€
  • copy β€” Range description. this is the pointer to your struct nvme_copy_range (or array of them) telling the command what to actually copy. πŸ“‹
  • args_size β€” Size of struct nvme_copy_args. yes she's self-aware, she knows how big she is. 🌈
  • fd β€” File descriptor of the nvme device. your ticket to the party, the handle to the actual device. πŸ”‘
  • timeout β€” Timeout in ms. how long you're willing to wait before you're like "okay this is taking forever." ⏳
  • nsid β€” Namespace identifier. which namespace we're talking to, obviously. πŸ—‚οΈ
  • ilbrt β€” Initial logical block reference tag. protection info girlies know. 🏷️
  • lr β€” Limited retry. the "please try again but like, don't go crazy" flag. πŸ”
  • fua β€” Force unit access. no caching games, write it for real. πŸ’Ύ
  • nr β€” Number of ranges. how many copy ranges you're throwing at this thing. πŸ”’
  • dspec β€” Directive specific value. directive-flavored detail, yk. πŸ“
  • lbatm β€” Logical block application tag mask. mask moment. 🎭
  • lbat β€” Logical block application tag. the tag itself, the mask's other half. ✨
  • prinfor β€” Protection information field for read. πŸ“–
  • prinfow β€” Protection information field for write. ✍️
  • dtype β€” Directive type. which flavor of directive, thank you very much. 🧁
  • format β€” Descriptor format. the format of the descriptor, shocking nobody. πŸ“
  • ilbrt_u64 β€” Initial logical block reference tag β€” 8 byte version required for enhanced protection info. yes it's a second, bigger ilbrt, and yes you need it when enhanced protection info is in the building. no you can't skip it. 😀
lowkey important: this is a struct, so the field order and the exact types are the whole point. __u64 is not __u32, int is not __u8, and format is not dtype. read the list, bestie. πŸ‘‘

and that's the whole page, no crumbs left behind πŸ“

signing off with the deets so you always know where this came from: this is struct nvme_copy_args from the libnvme API Manual, page libnvme(9), dated August 2026. go copy some blocks, you absolute main character. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from