libnvme_get_ana_log_atomic(9)

NAME
libnvme_get_ana_log_atomic - Retrieve Asymmetric Namespace Access log page atomically

SYNOPSIS
int libnvme_get_ana_log_atomic (struct libnvme_transport_handle *hdl , bool rae , bool rgo , struct nvme_ana_log *log , __u32 *len , unsigned int retries );

ARGUMENTS

hdl Transport handle

rae Whether to retain asynchronous events

rgo Whether to retrieve ANA groups only (no NSIDs)

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.

retries
    The maximum number of times to retry on log page changes

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 negative error code 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.