nvme_admin_passthru64(2)
β¨ nvme_admin_passthru64 β¨
okay bestie so you know how we're always in the libnvme API manual? yeah. this is nvme_admin_passthru64(2) and it is literally THE girl for sending a 64-bit nvme passthrough command. she's giving "submit a 64-bit nvme passthrough command" and honestly? obsessed. π«Ά
π NAME π
nvme_admin_passthru64 β Submit a 64-bit nvme passthrough command. no cap, that's her whole thing. π
π SYNOPSIS π
int nvme_admin_passthru64 (int fd , __u8 opcode , __u8 flags , __u16
rsvd , __u32 nsid , __u32 cdw2 , __u32 cdw3 , __u32 cdw10 , __u32 cdw11
, __u32 cdw12 , __u32 cdw13 , __u32 cdw14 , __u32 cdw15 , __u32 data_len
, void *data , __u32 metadata_len , void *metadata , __u32 timeout_ms ,
__u64 *result );
look at all those arguments. she's high maintenance but she's worth it. π§
πΈ ARGUMENTS πΈ
fdβ the file descriptor of the nvme device. like, your in. your entry point. πopcodeβ the nvme io command you're sending. this is the vibe you're selecting.flagsβ NVMe command flags. plot twist: not used. she's just there for the aesthetic. πrsvdβ reserved for future use. so like, don't touch, it's saving that seat. πnsidβ namespace identifier. which namespace we're talking to, bestie.cdw2β Command dword 2.cdw3β Command dword 3.cdw10β Command dword 10.cdw11β Command dword 11.cdw12β Command dword 12.cdw13β Command dword 13.cdw14β Command dword 14.cdw15β Command dword 15.
notice how there's no cdw4 through cdw9? yeah. that's the lore. we don't ask. π
data_lenβ length of the data transferred in this command, measured in bytes. πdataβ pointer to the user address of the data buffer. where the actual payload lives.metadata_lenβ length of metadata transferred in this command.metadataβ pointer to the user address of the metadata buffer. the little sidecar of the data buffer, if you will.timeout_msβ how long the kernel waits for the command to complete. the patience setting. β³resultβ optional field to return the result from the CQE dword 0. optional!! so she can also just not. β¨
π¦ DESCRIPTION π¦
she's the parameterized form of nvme_submit_admin_passthru64, okay? so if that one is the main character, this one is the glow-up edition. π
what she does: sets up and submits a struct nvme_passthru_cmd64. that's it. that's the whole job. she's efficient.
and like, known values for opcode are defined in enum nvme_admin_opcode, so if you're lost on what to put there, that's your study guide bestie. π
β RETURN β
here's the tea: she gives you the nvme command status if a response was received (check enum nvme_status_field for what those mean, iykyk), or she hits you with a -1 with errno set otherwise. so like, either you got a status or you got humbled. no in-between. π
vibe check: if you see-1, don't panic, just go read yourerrno. she's not being dramatic, she's being informative. π
so yeah. that's nvme_admin_passthru64(2) from the libnvme API manual, July 2026, version nvme_admin_passthru64(2) β she ate and left no crumbs. go submit some passthrough commands responsibly, bestie. ππβ¨
π¦ where this page comes from
- ubuntu stonking: libnvme-dev 1.16.2-1build1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms