nvme\_init\_cancel(9) libnvme API manual nvme\_init\_cancel(9)

# [NAME](#NAME)

nvme\_init\_cancel - Initialize passthru command for Cancel command

# [SYNOPSIS](#SYNOPSIS)

**void nvme\_init\_cancel** **(struct libnvme\_passthru\_cmd \*cmd ,** **\_\_u32 nsid ,** **\_\_u16 sqid ,** **\_\_u16 cid ,** **enum nvme\_cancel\_acode acode );**

# [ARGUMENTS](#ARGUMENTS)

[cmd](#cmd)

Passthru command to use

[nsid](#nsid)

Namespace identifier, or NVME\_NSID\_ALL

[sqid](#sqid)

Submission Queue Identifier (SQID) that the Cancel command is associated with

[cid](#cid)

Command Identifier (CID) of the command to abort. Ignored if *acode* is NVME\_CANCEL\_ACODE\_MULTIPLE\_CMD.

[acode](#acode)

Action Code (ACODE), see *enum nvme\_cancel\_acode*

# [DESCRIPTION](#DESCRIPTION)

The Cancel command requests an abort for specified commands submitted on the same I/O Submission Queue to which the Cancel command is submitted. The number of commands eligible for a deferred abort and the number of commands aborted are returned in the CQE result, see *enum* *nvme\_cancel\_cqe\_dw0*.

Initializes the passthru command buffer for the Cancel command.

nvme\_init\_cancel October 2026

---

Document: nvme_init_cancel-libnvme3(2) from nvme-cli 3.2-r0 (Chainguard OS)
Source: https://github.com/linux-nvme/nvme-cli
