libnvme_mi_admin_xfer(9)
π libnvme_mi_admin_xfer
okay bestie, welcome to the libnvme API manual β this one's the raw admin transfer interface, and it is literally the main character of "just send the thing to the controller already" π
β¨ NAME β¨
libnvme_mi_admin_xfer β raw admin transfer interface, fr fr.
πΈ SYNOPSIS πΈ
int libnvme_mi_admin_xfer (struct libnvme_transport_handle *hdl , struct
nvme_mi_admin_req_hdr *admin_req , size_t req_data_size , struct
nvme_mi_admin_resp_hdr *admin_resp , off_t resp_data_offset , size_t
*resp_data_size );
likeβ¦ six arguments, no cap. she's built different π€
π¦ ARGUMENTS π¦
hdlβ the transport handle you're sending the admin command to. this is your ride πadmin_reqβ request data. the actual ask πreq_data_sizeβ size of request data payload. payload only, bestie β not the header πadmin_respβ buffer for response data. where the controller's reply lands π«Άresp_data_offsetβ offset into request data to retrieve from controller. yeah, that's what it says β keep it exactly like that, don't @ me πresp_data_sizeβ size of response data buffer, updated to received size. she goes in as a size and comes out as the size β¨
π DESCRIPTION π
So what this does: it performs an arbitrary NVMe Admin command, using the provided request data in admin_req. simple as that, lowkey iconic.
the size of the request data payload is specified in req_data_size β and listen, this does not include the standard header length. so a header-only request would have a size of 0. zero. nada. that's not a bug, that's the vibe check β
On success, response data is stored in admin_resp, which has an optional appended payload buffer of resp_data_size bytes. The actual payload transferred will be stored in resp_data_size (she updates herself, we love a self-aware buffer π
). These sizes do not include the Admin request header, so 0 represents no payload. same rules, both directions πͺ
As with all Admin commands, we can request partial data from the Admin Response payload, offset by resp_data_offset. partial reads ate, honestly π₯
See:struct nvme_mi_admin_req_hdrandstruct nvme_mi_admin_resp_hdr. go look at the structs bestie, iykyk π§
β RETURN β
The nvme command status if a response was received (see enum nvme_status_field) or a negative error code otherwise. so either you get a status, or you get a negative number and a little sadness π
and that's the whole page, bestie β go forth and xfer ππ¦
this has been the libnvme API manual, dated October 2026 β libnvme_mi_admin_xfer(9) out π slay, bye π
π¦ 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