libnvme_get_ana_log_atomic(9)

πŸ“¦ version 3.2, in arch rolling

✨ libnvme_get_ana_log_atomic ✨

okay bestie, welcome to the libnvme API manual β€” this page is all about libnvme_get_ana_log_atomic(9), and no cap, the name literally tells you the whole vibe: grab the Asymmetric Namespace Access log page, and do it atomically. πŸ¦‹


πŸ’… NAME πŸ’…

libnvme_get_ana_log_atomic β€” retrieve the 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 β€” the transport handle. your main character pointer, your ride-or-die 🫢
  • rae β€” whether to retain asynchronous events πŸ‘€
  • rgo β€” whether to retrieve ANA groups only, like, no NSIDs at all πŸ™ˆ
  • log β€” pointer to a buffer that receives the ANA log page πŸ’–
  • len β€” input: the length of the log page buffer. output: the actual length of the ANA log page. literally a glow-up in both directions ✨
  • 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. that's the whole section, bestie, it's giving minimal and mysterious πŸ’…


πŸ”₯ RETURN πŸ”₯

If it slays: returns 0 and sets *len to the actual log page length βœ…

If it does not slay: returns the nvme command status if a response was received (see enum nvme_status_field) or a negative error code otherwise 😭

And here's the errno tea, don't skip it:

  • Sets errno = EINVAL if retries == 0 🚫
  • Sets errno = EAGAIN if it's 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 πŸ“¦
fr fr check your buffer size before you call this, ENOSPC is not the moment you want to be having 🌸

and that's the page, periodt πŸŽ€ this was the libnvme API manual, from October 2026, covering libnvme_get_ana_log_atomic(9) β€” go forth and read that log page atomically, icon πŸ‘‘πŸ’–

πŸ“¦ where this page comes from