nvmet_rdma_device_removal(9)
π nvmet_rdma_device_removal β like, the Kernel API Manual page for it
okay so bestie, welcome to the Kernel API Manual entry for nvmet_rdma_device_removal β it's giving "small function, big responsibility" and honestly we're obsessed π
β¨ NAME β¨
nvmet_rdma_device_removal β literally the handler for RDMA device removal π¦
πΈ SYNOPSIS πΈ
int nvmet_rdma_device_removal (struct rdma_cm_id *cm_id , struct
nvmet_rdma_queue *queue );
like yes, that's the whole signature, no cap β¨
π ARGUMENTS π
cm_idβ therdma_cmid, which is used for the nvmet port πqueueβ the nvmet rdma queue (it's the cm id'sqp_context, iykyk) π«Ά
π DESCRIPTION π
so the DEVICE_REMOVAL event is basically the kernel sliding into your DMs to tell you the RDMA device is about to unplug π like, the hardware's leaving the group chat. and heads up: this event can be generated on a normal queue cm_id and/or on a device bound listener cm_id β and in that listener case, queue will be null (yep, null, main character energy of absent values π).
but here's the slay part: we already registered an ib_client to handle device removal for queues, so the only thing left for us to deal with is the listening port cm_ids π in that case we nullify the priv to prevent double cm_id destruction, and we destroy the cm_id implicitly by returning a non-zero rc to the callout. periodt. π₯
no extra steps, no overthinking β just nullify thatpriv, bounce a non-zerorcback at the callout, and let the implicit destruction do its thing β¨
π SEE ALSO π
- Kernel file
./drivers/nvme/target/rdma.cβ go read it, fr fr π
and that's the vibe check, bestie π this icon of a page comes from ./drivers/nvme/target, dated October 2026, and it's filed under nvmet_rdma_device_removal(9) π ty for coming to my ted talk, mwah π«ΆπΈ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms