fc_block_rport(9)
π 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 thatscsi_ehis 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β thefc_rportleft the stateFC_PORTSTATE_BLOCKED. Slay, we're free πFAST_IO_FAILβ thefast_io_fail_tmofired. This one should be passed back toscsi_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:
fc_get_event_number(9)fc_host_post_fc_event(9)fc_host_post_event(9)fc_host_post_vendor_event(9)fc_find_rport_by_wwpn(9)fc_host_fpin_rcv(9)fc_eh_timed_out(9)fc_queue_work(9)fc_flush_work(9)fc_queue_devloss_work(9)fc_flush_devloss(9)fc_remove_host(9)fc_starget_delete(9)fc_rport_final_delete(9)fc_remote_port_create(9)fc_remote_port_add(9)fc_remote_port_delete(9)fc_remote_port_rolechg(9)fc_timeout_deleted_rport(9)fc_timeout_fail_rport_io(9)fc_scsi_scan_rport(9)fc_block_scsi_eh(9)fc_vport_setup(9)fc_vport_create(9)fc_vport_terminate(9)fc_vport_sched_delete(9)fc_bsg_job_timeout(9)fc_bsg_host_dispatch(9)fc_bsg_rport_dispatch(9)fc_bsg_hostadd(9)fc_bsg_rportadd(9)fc_bsg_remove(9)
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
- 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