scsi_host_busy_iter(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 to Scsi_Host. your host. your main character. πŸ‘‘
  • fn β€” the function to call on each busy command. every single one gets a little visit from fn 🫢
  • priv β€” the data pointer that gets passed straight through to fn. 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:


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