nvme_submit_io_passthru(2)
β¨ NAME β¨
nvme_submit_io_passthru β bestie, this is the one that submits an nvme passthrough command π
Okay so real talk, this is part of the libnvme API manual, section 2, and it's genuinely iconic if you're the kind of girl who talks directly to her NVMe drive.
π SYNOPSIS π
int nvme_submit_io_passthru (int fd , struct nvme_passthru_cmd *cmd ,
__u32 *result );
She takes three things and gives you back an int. That's the whole vibe. Periodt.
π¦ ARGUMENTS π¦
fdβ the file descriptor of your nvme device. Yes girl, you gotta have the door open first. πͺcmdβ the nvme io command you wanna send. This is the whole point of the function, this is her moment, main character energy fr fr. πresultβ an optional field to return the result from theCQE DW0. Optional!! So if you don't care about theCQE DW0you can just... not. No pressure bestie. πΈ
π DESCRIPTION π
So like, what does she actually do? She uses NVME_IOCTL_IO_CMD for the ioctl request. That's it. That's the tea. β
That's literally the entire description and honestly? Respect. She knows who she is.
No cap, NVME_IOCTL_IO_CMD is the ioctl request in question β don't go swapping it out for something else, she said what she said. π«Ά
π RETURN π
Two outcomes, bestie, and you need to know both:
- If a response was received, you get back the nvme command status β and you should go peek at
enum nvme_status_fieldto decode what that status is actually saying. π - Otherwise? You get
-1witherrnoset. So check thaterrno, she's trying to tell you something. π
π SEE ALSO π
Not listed here, but enum nvme_status_field got name-dropped up in RETURN and lowkey she's the one you're gonna want to go read next. Iykyk.
That's the whole page, babe β she's short, she's sweet, she submits your nvme passthrough command and she goes home. π
Written up all cute for the libnvme API manual, nvme_submit_io_passthru(2), dated July 2026, and she said what she said β nvme_submit_io_passthru on both ends, no crumbs. Slay. π
β¨π
π¦ 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