nvme_init_cancel(9)
π nvme_init_cancel β bestie's guide to the libnvme API manual
Okay so picture this: you're deep in the libnvme API manual (yes, the whole thing), and you've stumbled onto nvme_init_cancel(9). Don't panic π«Ά β it's literally just the setup girlie for the Cancel command, and she's way simpler than she looks. Let's get into it β¨
πΈ NAME πΈ
nvme_init_cancel β initializes the passthru command buffer so it's all cute and ready for the Cancel command π
β¨ SYNOPSIS β¨
void nvme_init_cancel (struct libnvme_passthru_cmd *cmd , __u32 nsid ,
__u16 sqid , __u16 cid , enum nvme_cancel_acode acode );
No cap, that's the whole signature. Five args, zero drama. π
π ARGUMENTS π
cmdβ the passthru command you're gonna use. This is the blank canvas, the main character, the one getting initialized. ποΈnsidβ Namespace identifier, orNVME_NSID_ALLif you're going for the "everybody" vibe. It's a__u32, so she's got range.sqidβ the Submission Queue Identifier (SQID) that the Cancel command is associated with. Think of it as the group chat this Cancel is getting sent into. π¬cidβ the Command Identifier (CID) of the command you're trying to abort. β οΈ Big heads-up: this gets ignored ifacodeisNVME_CANCEL_ACODE_MULTIPLE_CMD. Like, completely ignored. Don't come for her. πacodeβ the Action Code (ACODE). Peepenum nvme_cancel_acodefor the full menu of options. π
π₯ DESCRIPTION π₯
So here's the tea on what the Cancel command actually does β β it requests an abort for specified commands submitted on the same I/O Submission Queue that the Cancel command itself was submitted to. Same queue, bestie. No hopping around. π¦
And the receipts? The number of commands eligible for a deferred abort, plus the number of commands aborted, both come back in the CQE result β see enum nvme_cancel_cqe_dw0 if you wanna get into the nitty-gritty. π
This function's whole job is initializing the passthru command buffer for the Cancel command. That's it. That's the job. And she ate. π β¨
ngl, thecid-ignored-when-NVME_CANCEL_ACODE_MULTIPLE_CMDthing is the one detail people miss, so don't let it be you, okay? π
That's the whole page, bestie β straight from the libnvme API manual, dating all the way to October 2026 π
π¦ 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