NVME_IDENTIFY_ACTIVE_NS_LIST_CSI(2)

✨ NAME ✨

nvme_identify_active_ns_list_csi β€” bestie, this one hands you the list of active namespace IDs that belong to a specific I/O command set πŸ‘‘

This is page nvme_identify_active_ns_list_csi(2) from the libnvme API manual btw, so you already know it's official.


🌸 SYNOPSIS 🌸

int nvme_identify_active_ns_list_csi (int fd , __u32 nsid , enum
       nvme_csi csi , struct nvme_ns_list *ns_list );

okay so like β€” one function, four things going in, an int coming out. no drama πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • fd β€” the file descriptor of your nvme device. the lil handle that says "yes, this drive" 🫢
  • nsid β€” return namespaces greater than this identifier. so it's giving "start after this one, please."
  • csi β€” the Command Set Identifier. which I/O command set we're vibing with 🌈
  • ns_list β€” user space destination address where the data gets transferred to. that's where the goodies land ✨

πŸ’– DESCRIPTION πŸ’–

So here's the tea, bestie: a list of 1024 namespace IDs gets returned to the host, and it contains the active NSIDs in increasing order that are greater than the value you dropped in the Namespace Identifier (nsid) field of the command πŸ¦‹

AND (this part matters) they also have to match the I/O Command Set that you specified in the csi argument. no matching, no entry, periodt.

and if you wanna know exactly what shape the returned structure is β€” like, the actual receipt β€” go peek at struct nvme_ns_list for the definition of what comes back πŸ“‹


⭐ RETURN ⭐

Here's what you get back:

  • the nvme command status if a response was actually received (go look at enum nvme_status_field for the full menu of statuses) πŸ’š
  • or -1 with errno set, otherwise. yeah. that one. the "something went sideways" special πŸ’€
not me being emotionally attached to a return value but fr fr, check errno when you see that -1.

πŸ’œ SEE ALSO πŸ’œ

hmm, the original page keeps its SEE ALSO energy inside the description β€” so clock struct nvme_ns_list and enum nvme_status_field as your two referenced icons here πŸ‘‘ go read those next, iykyk.


okay that's the whole page!! go forth and identify those namespaces, you absolute main character 🌟

this was the libnvme API manual β€” page nvme_identify_active_ns_list_csi(2), dated July 2026 πŸŽ€

mwah, love u, bye πŸ’…βœ¨

πŸ“¦ where this page comes from