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 the CQE DW0. Optional!! So if you don't care about the CQE DW0 you 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_field to decode what that status is actually saying. πŸ”
  • Otherwise? You get -1 with errno set. So check that errno, 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