scsi_host_block(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ scsi_host_block β€” from the Kernel API Manual, bestie ✨

Okay so real talk, this one's from the Kernel API Manual and it's honestly such a mood. Let's get into it 🫢


πŸŽ€ NAME πŸŽ€

scsi_host_block β€” the "try to transition all logical units to the SDEV_BLOCK state" girlie πŸ’…


✨ SYNOPSIS ✨

int scsi_host_block (struct Scsi_Host *shost );

That's it. That's the whole entrance. Main character energy, zero notes. πŸ‘‘


🌸 ARGUMENTS 🌸

  • shost β€” the device you wanna block. That's the one. Give her the vibe check πŸ’–

πŸ’œ DESCRIPTION πŸ’œ

So what she does is pause SCSI command processing for all the logical units hanging out with that SCSI host, and then she waits until the pending scsi_queue_rq calls have finished. Like, actually finished. No cutting the line, no "almost done" β€” she waits fr fr 😀✨

She returns zero if everything slays, or a negative error code if it does not slay. No cap.

Heads up: zero = success, negative = failure. That's the whole returns situation, don't overthink it πŸ¦‹

🌈 SEE ALSO 🌈

Kernel file ./drivers/scsi/scsi_lib.c and honestly her whole friend group β€” like, the entire group chat showed up:

Like, forty of them. Iconic. Obsessed. πŸ“


🧚 the little sign-off 🧚

Brought to you by <pink>./drivers/scsi</pink> πŸ’–, dated October 2026 ⭐, and yes it lives under scsi_host_block(9) in case you forgot where you came from 😭🫢

Bye bestie, go block those logical units responsibly πŸ’…βœ¨

πŸ“¦ where this page comes from