nvme_identi..._ns_list_csi(2)
β¨ nvme_identi..._ns_list_csi(2) β¨
okay bestie, come sit with me π this one lives in the libnvme API manual, and it's genuinely so useful once it clicks. full name's a mouthful so we're abbreviating: nvme_identi..._ns_list_csi. the way that the linker and the man page writer both gave up on this nameβ¦ iconic π
π NAME π
nvme_identify_allocated_ns_list_csi β allocated namespace ID list, but likeβ¦ associated with a specified I/O command set π¦
π«Ά SYNOPSIS π«Ά
int nvme_identify_allocated_ns_list_csi (int fd , __u32 nsid , enum
nvme_csi csi , struct nvme_ns_list *ns_list );
four things in, one int out, no cap π
π ARGUMENTS π
fdβ file descriptor of the nvme device β¨ the little handle you got when you opened the thingnsidβ return namespaces greater than this identifier. yes literally, strictly greater, we don't do equal herecsiβ the Command Set Identifier π (she's the one deciding which I/O command set we're matching against)ns_listβ user space destination address where we transfer the data πΈ like, you hand her a place to put stuff, that's the vibe
π DESCRIPTION π
so here's the tea, bestie β a list of 1024 namespace IDs gets returned to the host, containing allocated NSIDs in increasing order that are:
- greater than the value you specified in the
nsidfield of the command, and - matching the I/O Command Set specified in the
csiargument π
both conditions. no shortcuts. sorted ascending, allocated only, filtered by command set. obsessed with a well-behaved API fr fr β¨
peep struct nvme_ns_list for the definition of the returned structure π that's where the shape of what you get back is written down.
π RETURN π
- the nvme command status if a response was received (go look at
enum nvme_status_fieldfor what those mean, iykyk) - or
-1witherrnoset otherwise π
and that's literally it. one call, one list, up to 1024 icon namespaces, main character energy only π
mwah, that's the whole page babes π§π this was nvme_identi..._ns_list_csi(2) from the libnvme API manual, dated July 2026. go write something that slays, and remember: strictly greater than, always πβ¨
π¦ where this page comes from
- ubuntu stonking: libnvme-dev 1.16.2-1build1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms