fc_block_rport(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… fc_block_rport β€” Kernel API Manual, bestie edition ✨

Okay so this is fc_block_rport(9) from the Kernel API Manual, and it's lowkey one of those tiny functions that keeps your whole SCSI stack from falling apart. Let's get into it 🫢


🌸 NAME 🌸

fc_block_rport β€” block the SCSI eh thread for a blocked fc_rport. That's it, that's the whole vibe πŸ’…


✨ SYNOPSIS ✨

int fc_block_rport (struct fc_rport *rport );

πŸŽ€ ARGUMENTS πŸŽ€

  • rport β€” the remote port that scsi_eh is trying to recover. This is the poor little guy the error handler is out here trying to rescue 😭

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so picture this: you're in a FC LLD scsi_eh callback, right? You can call this routine from there. What it does is it blocks the scsi_eh thread until the fc_rport leaves FC_PORTSTATE_BLOCKED, or until the fast_io_fail_tmo fires β€” whichever happens first, no cap ⏳

Why do we even need this? Because if you don't block, the scsi_eh will go ahead and fail recovery actions for rports that are already blocked, and that leads to offlined SCSI devices. Which is giving disaster. So yeah, this little block is doing main character energy work behind the scenes πŸ‘‘


πŸ”₯ RETURN πŸ”₯

  • 0 β€” the fc_rport left the state FC_PORTSTATE_BLOCKED. Slay, we're free πŸ’–
  • FAST_IO_FAIL β€” the fast_io_fail_tmo fired. This one should be passed back to scsi_eh, fr fr, don't just drop it πŸ™ˆ

🌈 SEE ALSO 🌈

Kernel file ./drivers/scsi/scsi_transport_fc.c β€” and honestly the whole friend group is here, so let's list them all out:


And that's the whole page, bestie 🧚 Signing off from the ./drivers/scsi source, dated October 2026, manual fc_block_rport(9) in the Kernel API Manual β€” go block those rports and stay iconic πŸ’œ

πŸ“¦ where this page comes from