scsi_host_c...all_commands(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… scsi_host_c...all_commands(9) β€” like, the whole entire scoop

okay so this is a page straight out of the Kernel API Manual (that's the manual name bestie, write it down πŸ“) and it's about a little function called scsi_host_complete_all_commands. yes the page title is lowkey abbreviated with the ..., no that's not a typo, that's just how it's printed on the tin. we move πŸ’«


✨ SYNOPSIS ✨

void scsi_host_complete_all_commands (struct Scsi_Host *shost , enum
scsi_host_status status );

look at her go. returns void, takes two things, done. πŸŽ€


🌸 ARGUMENTS 🌸

  • shost β€” the Scsi Host on which the commands should be terminated. this is the host that's about to get a whole vibe reset 🫢
  • status β€” the Status that gets set for the terminated commands. whatever you pass here is the mood these commands are leaving with πŸ’…

πŸ”₯ DESCRIPTION πŸ”₯

okay so here's the tea, and it's kind of a big deal: there is no protection against modification of the number of outstanding commands. none. zero. not a single lock, not a single guardrail. 🚨

so it is literally the responsibility of the caller to make sure that concurrent I/O submission and/or completion is stopped when calling this function. like, you gotta shut that door before you start rearranging the furniture, y'know? πŸšͺ✨ don't call this while stuff is still flying in and out β€” that's on you, bestie.

not me making you pinky-promise to quiesce your I/O first πŸ™ˆ this one's a real caveat, fr fr β€” the function itself will not save you.

πŸ¦‹ SEE ALSO πŸ¦‹

the Kernel file ./drivers/scsi/hosts.c and honestly a whole friend group of functions:

go read them, they all ate πŸ‘‘βœ¨


ta-da, that's the whole page!! this lil slice of the Kernel API Manual lives under ./drivers/scsi and was dated October 2026 β€” iconic of her, no cap. byeeee, go terminate those commands responsibly πŸ’–πŸ¦‹πŸ“

πŸ“¦ where this page comes from