nvmet_fc_invalidate_host(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 the hosthandle. 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 🌈


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