---
name: "nvme_init_write_zeros-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_write_zeros-libnvme3"
---

# nvme\_init\_write\_zeros-libnvme3(2)

Initialize passthru command for a write zeroes command

## NAME

nvme\_init\_write\_zeros - Initialize passthru command for a write zeroes command

## SYNOPSIS

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

## ARGUMENTS

- cmd

  Passthru command to use

- nsid

  Namespace ID

- slba

  Starting logical block

- nlb

  Number of logical blocks (0-based)

- control

  Upper 16 bits of cdw12

- dspec

  Directive specific value

- dsm

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

- cev

  Command Extension Value (CETYPE is non-zero)

## DESCRIPTION

Initializes the passthru command buffer for the Write Zeroes command.

## NOTE

Write Zeroes command does not transfer data or metadata.
