scsi_host_c...all_commands(9)
π 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β theScsi Hoston which the commands should be terminated. this is the host that's about to get a whole vibe reset π«Άstatusβ theStatusthat 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:
scsi_host_set_state(9)scsi_remove_host(9)scsi_add_host_with_dma(9)scsi_host_alloc(9)scsi_host_lookup(9)scsi_host_get(9)scsi_host_busy(9)scsi_host_put(9)scsi_queue_work(9)scsi_flush_work(9)scsi_host_busy_iter(9)
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
- 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