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

# [NAME](#NAME)

nvme\_init\_io - Initialize passthru command for a generic user I/O command

# [SYNOPSIS](#SYNOPSIS)

**void nvme\_init\_io** **(struct libnvme\_passthru\_cmd \*cmd ,** **\_\_u8 opcode ,** **\_\_u32 nsid ,** **\_\_u64 slba ,** **void \*data ,** **\_\_u32 data\_len ,** **void \*metadata ,** **\_\_u32 metadata\_len );**

# [ARGUMENTS](#ARGUMENTS)

[cmd](#cmd)

Passthru command to use

[opcode](#opcode)

Opcode to execute

[nsid](#nsid)

Namespace ID

[slba](#slba)

Starting logical block

[data](#data)

Pointer to user address of the data buffer

[data\_len](#data_len)

Length of user buffer, *data*, in bytes

[metadata](#metadata)

Pointer to user address of the metadata buffer

[metadata\_len](#metadata_len)

Length of user buffer, *metadata*, in bytes

# [DESCRIPTION](#DESCRIPTION)

Initializes the passthru command buffer for a generic NVM I/O command.

# [NOTE](#NOTE)

If *elbas* is true, the caller must ensure the definition/logic for nvme\_init\_set\_var\_size\_tags is available and that the return value from that function is checked for error.

nvme\_init\_io October 2026

---

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