---
name: "nvme_init_io-libnvme3"
section: "2"
platform: "linux"
package: "nvme-cli"
version: "3.2-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/nvme_init_io-libnvme3"
---

# nvme\_init\_io-libnvme3(2)

Initialize passthru command for a generic user I/O command

## NAME

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

## 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

- cmd

  Passthru command to use

- opcode

  Opcode to execute

- nsid

  Namespace ID

- slba

  Starting logical block

- data

  Pointer to user address of the data buffer

- data\_len

  Length of user buffer, *data*, in bytes

- metadata

  Pointer to user address of the metadata buffer

- metadata\_len

  Length of user buffer, *metadata*, in bytes

## DESCRIPTION

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

## 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.
