---
name: "nvme_mi_admin_get_ana_log_atomic"
section: "2"
platform: "linux"
package: "libnvme-dev"
version: "1.13-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/nvme_mi_admin_get_ana_log_atomic"
---

# nvme\_mi\_admin\_get\_ana\_log\_atomic(2)

Retrieve Asymmetric Namespace Access log page atomically

## NAME

nvme\_mi\_admin\_get\_ana\_log\_atomic - Retrieve Asymmetric Namespace Access log page atomically

## SYNOPSIS

**int nvme\_mi\_admin\_get\_ana\_log\_atomic** **(nvme\_mi\_ctrl\_t ctrl** *,* **bool rgo** *,* **bool rae** *,* **unsigned int retries** *,* **struct nvme\_ana\_log \*log** *,* **\_\_u32 \*len** *);*

## ARGUMENTS

- ctrl

  Controller to query

- rgo

  Whether to retrieve ANA groups only (no NSIDs)

- rae

  Whether to retain asynchronous events

- retries

  The maximum number of times to retry on log page changes

- log

  Pointer to a buffer to receive the ANA log page

- len

  Input: the length of the log page buffer. Output: the actual length of the ANA log page.

## DESCRIPTION

See *struct nvme\_ana\_log* for the definition of the returned structure.

## RETURN

If successful, returns 0 and sets \*len to the actual log page length. If unsuccessful, returns the nvme command status if a response was received (see *enum nvme\_status\_field*) or -1 with errno set otherwise. Sets errno = EINVAL if retries == 0. Sets errno = EAGAIN if unable to read the log page atomically because chgcnt changed during each of the retries attempts. Sets errno = ENOSPC if the full log page does not fit in the provided buffer.
