nvme_get_log_ana_groups(2)

πŸ’– nvme_get_log_ana_groups β€” bestie edition πŸ’–

okay so this is a page from the libnvme API manual, section 2, and the function we're obsessing over today is nvme_get_log_ana_groups. she's giving "let me get you the Asymmetric Namespace Access groups only log page" and honestly? iconic. πŸ¦‹


✨ NAME ✨

nvme_get_log_ana_groups β€” Retrieve Asymmetric Namespace Access groups only log page


🌸 SYNOPSIS 🌸

int nvme_get_log_ana_groups (int fd , bool rae , __u32 len , struct
       nvme_ana_log *log );

like yes she takes four things and gives you back an int, we love a straightforward queen. πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • fd β€” File descriptor of nvme device. this is your lil ticket to the device, no ticket no entry bestie 🎟️
  • rae β€” Retain asynchronous events. so like, do we keep the async events around? that's the vibe check right there ✨
  • len β€” The allocated length of the log page. how much room you set aside for the log page, so be generous πŸ’–
  • log β€” User address to store the ana group log. this is where the log actually lands, hand her a valid address bestie 🫢

🌈 DESCRIPTION 🌈

See struct nvme_ana_log for the definition of the returned structure. that's it, that's the whole description β€” she's a "go read the struct" kind of girl and honestly respect. go look at struct nvme_ana_log, the answers are all in there πŸ“–βœ¨


πŸ’« RETURN πŸ’«

The nvme command status if a response was received (see enum nvme_status_field) or -1 with errno set otherwise.

so: got a response? you get the nvme command status, peek at enum nvme_status_field for what it means πŸ”. no response? it's a -1 and errno is doing the talking. no cap. 😭

lowkey important: -1 always comes with errno set, so don't just stare at the return value, check errno too bestie πŸ’€

and that's the whole page, you ate that πŸ“

this lil guide came from the libnvme API manual, dated July 2026, and yeah the page literally names herself nvme_get_log_ana_groups twice because she contains multitudes πŸ’œ mwah, go log some ana groups πŸ‘‘

πŸ“¦ where this page comes from