scsi_host_busy_iter(9)
π scsi_host_busy_iter(9) β from the Kernel API Manual, bestie
okay so picture this: you're deep in the SCSI layer, and you need to walk every single busy command on a host. that's it. that's the function. she's a little iterator and she ate. β¨
πΈ NAME πΈ
scsi_host_busy_iter β literally iterate over all busy commands. all of them. the busy ones. no cap. π¦
β SYNOPSIS β
void scsi_host_busy_iter (struct Scsi_Host *shost , bool (*fn)(struct scsi_cmnd *, void *) , void *priv );
look at her signature, she's gorgeous, don't touch it π
π ARGUMENTS π
shostβ a pointer toScsi_Host. your host. your main character. πfnβ the function to call on each busy command. every single one gets a little visit fromfnπ«Άprivβ the data pointer that gets passed straight through tofn. like a little care package, hand-delivered π
β¨ DESCRIPTION β¨
so here's the vibe check: if you need locking against concurrent command completions, the caller has to provide it. that's on you, bestie. the function is not doing it for you and honestly? she's not sorry. π
fr fr, read that again β the locking is your job, not hers π
π SEE ALSO π
kernel file ./drivers/scsi/hosts.c, plus the whole friend group:
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_complete_all_commands(9)
and that's the whole page, babe π she lives in ./drivers/scsi, she's stamped October 2026, and this has been your girl reporting live from the Kernel API Manual β slay, go read your kernel source, 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