DOKK / manpages / debian 12 / libnvme-dev / nvme_ns_detach_ctrls.2.en
nvme_ns_detach_ctrls(2) libnvme API manual nvme_ns_detach_ctrls(2)

nvme_ns_detach_ctrls - Detach namespace from controllers

int nvme_ns_detach_ctrls (int fd , __u32 nsid , struct nvme_ctrl_list *ctrlist );

File descriptor of nvme device
Namespace ID to detach
Controller list to modify attachment state of nsid

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

nvme_ns_detach_ctrls January 2023