nvmet_fc_invalidate_host(9)
π nvmet_fc_invalidate_host (Kernel API Manual) π
okay so bestie, welcome to another kernel API manual moment β this one lives in the Kernel API Manual, and it's called nvmet_fc_invalidate_host. it's the transport entry point that an LLDD calls to remove references to a hosthandle for LS's. yes, that's the whole vibe. let's get into it β¨
β¨ SYNOPSIS β¨
void nvmet_fc_invalidate_host (struct nvmet_fc_target_port *target_port
, void *hosthandle );
like, that's it. one function, two args, void return. short and iconic π
π ARGUMENTS π
target_portβ pointer to the (registered) target port that a prior LS was received on, and which supplied the transport thehosthandle. iykyk, it's the port that was doing the receiving π«Άhosthandleβ the handle (pointer) that represents the host port that no longer has connectivity, and that LS's should no longer be directed to. rip to that host port's connectivity fr π
πΈ DESCRIPTION πΈ
so what's actually happening here? the nvmet-fc layer makes sure that any references to the hosthandle on the targetport are forgotten β and by "forgotten" i mean literally set to NULL. the LLDD will typically call this when a login with a remote host port has been lost, which means LS's for the remote host port are no longer possible. no login, no LS's, periodt π₯
now here's the part you gotta pay attention to, bestie π β if an LS request is outstanding to the targetport/hosthandle (or issued concurrently with the call to invalidate the host), then the LLDD is responsible for terminating/aborting the LS and completing the LS request. that's on the LLDD, not on this function, no cap.
and it is recommended that these terminations/aborts happen after calling to invalidate the host handle, so you avoid additional retries by the nvmet-fc transport. the nvmet-fc transport may continue to reference the host handle while it cleans up outstanding NVME associations. then, when it's all done, the nvmet-fc transport will call the ops->host_release callback to notify the LLDD that all references are complete and the related host handle can be recovered. slay, closure π¦
β NOTE β
if there are no references, the callback may be called before the invalidate host call returns. so like... don't be caught off guard by that, bestie π
π SEE ALSO π
- Kernel file
./drivers/nvme/target/fc.c nvmet_fc_register_targetport(9)nvmet_fc_unregister_targetport(9)nvmet_fc_rcv_ls_req(9)nvmet_fc_rcv_fcp_req(9)nvmet_fc_rcv_fcp_abort(9)
and that's the whole page, bestie! π this cutie comes to you from ./drivers/nvme/target β that's the source/version β dated October 2026, and yes, nvmet_fc_invalidate_host(9) is the name. go forth and invalidate those hosts responsibly, 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