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

# [NAME](#NAME)

nvme\_init\_write - Initialize passthru command for a user write command

# [SYNOPSIS](#SYNOPSIS)

**void nvme\_init\_write** **(struct libnvme\_passthru\_cmd \*cmd ,** **\_\_u32 nsid ,** **\_\_u64 slba ,** **\_\_u16 nlb ,** **\_\_u16 control ,** **\_\_u16 dspec ,** **\_\_u8 dsm ,** **\_\_u8 cev ,** **void \*data ,** **\_\_u32 data\_len ,** **void \*metadata ,** **\_\_u32 metadata\_len );**

# [ARGUMENTS](#ARGUMENTS)

[cmd](#cmd)

Passthru command to use

[nsid](#nsid)

Namespace ID

[slba](#slba)

Starting logical block

[nlb](#nlb)

Number of logical blocks (0-based)

[control](#control)

Upper 16 bits of cdw12

[dspec](#dspec)

Directive specific value

[dsm](#dsm)

Data set management attributes (CETYPE is zero), see *enum nvme\_io\_dsm\_flags*

[cev](#cev)

Command Extension Value (CETYPE is non-zero)

[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 the Write command.

nvme\_init\_write October 2026

---

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