nvme\_init\_ns\_attach\_ctrls(9) libnvme API manual nvme\_init\_ns\_attach\_ctrls(9)

# [NAME](#NAME)

nvme\_init\_ns\_attach\_ctrls - Initialize passthru command to attach namespace to controllers

# [SYNOPSIS](#SYNOPSIS)

**void nvme\_init\_ns\_attach\_ctrls** **(struct libnvme\_passthru\_cmd \*cmd ,** **\_\_u32 nsid ,** **struct nvme\_ctrl\_list \*ctrlist );**

# [ARGUMENTS](#ARGUMENTS)

[cmd](#cmd)

Passthru command to use

[nsid](#nsid)

Namespace ID to attach

[ctrlist](#ctrlist)

Controller list buffer to modify attachment state of nsid

# [DESCRIPTION](#DESCRIPTION)

Initializes the passthru command buffer for the Namespace Attach command (NVME\_NS\_ATTACH\_SEL\_CTRL\_ATTACH).

nvme\_init\_ns\_attach\_ctrls October 2026

---

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