libnvme\_ns\_write(9) libnvme API manual libnvme\_ns\_write(9)

# [NAME](#NAME)

libnvme\_ns\_write - Write to a namespace

# [SYNOPSIS](#SYNOPSIS)

**int libnvme\_ns\_write** **(struct libnvme\_ns \*n ,** **void \*buf ,** **off\_t offset ,** **size\_t count );**

# [ARGUMENTS](#ARGUMENTS)

[n](#n)

Namespace instance

[buf](#buf)

Buffer with data to be written

[offset](#offset)

LBA offset of *n*

[count](#count)

Number of sectors in *buf*

# [RETURN](#RETURN)

Number of sectors written or -1 on error

libnvme\_ns\_write October 2026

---

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