---
name: "nvme_init_copy-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_copy-libnvme3"
---

# nvme\_init\_copy-libnvme3(2)

Initialize passthru command for Copy command

## NAME

nvme\_init\_copy - Initialize passthru command for Copy command

## SYNOPSIS

**void nvme\_init\_copy** **(struct libnvme\_passthru\_cmd \*cmd** *,* **\_\_u32 nsid** *,* **\_\_u64 sdlba** *,* **\_\_u16 nr** *,* **\_\_u8 desfmt** *,* **\_\_u8 prinfor** *,* **\_\_u8 prinfow** *,* **\_\_u8 cetype** *,* **\_\_u8 dtype** *,* **bool stcw** *,* **bool stcr** *,* **bool fua** *,* **bool lr** *,* **\_\_u16 cev** *,* **\_\_u16 dspec** *,* **void \*cpydsc** *);*

## ARGUMENTS

- cmd

  Passthru command to use

- nsid

  Namespace identifier

- sdlba

  Start destination LBA

- nr

  Number of ranges (1-based, 0-based in command)

- desfmt

  Descriptor format

- prinfor

  Protection information field for read

- prinfow

  Protection information field for write

- cetype

  Command Extension Type

- dtype

  Directive Type

- stcw

  Storage Tag Check Write

- stcr

  Storage Tag Check Read

- fua

  Force unit access

- lr

  Limited retry

- cev

  Command Extension Value

- dspec

  Directive specific value

- cpydsc

  Range description buffer

## DESCRIPTION

Initializes the passthru command buffer for the Copy command by calculating the data length and calling the generic I/O initializer.
