srp_reconnect_rport(9)
β¨ srp_reconnect_rport(9) β¨
okay so bestie, welcome to the Kernel API Manual β this one's srp_reconnect_rport, and it's literally about reconnecting to an SRP target port π«Ά
π NAME
srp_reconnect_rport β reconnect to an SRP target port πΈ
π SYNOPSIS
int srp_reconnect_rport (struct srp_rport *rport );
π ARGUMENTS
rportβ the SRP target port. that's her, that's the girl π
π¦ DESCRIPTION
so here's the vibe: this function blocks SCSI command queueing before it invokes reconnect, so that queuecommand won't get invoked concurrently with reconnect from outside the SCSI EH. no cap, this matters β because a reconnect implementation may reallocate resources that queuecommand needs π₯
like, imagine queuecommand rolling up mid-reconnect asking for resources that just got yeeted. not the moment. so we block first. iconic behavior honestly π
β NOTES
- π¨ this function neither waits until outstanding requests have finished nor tries to abort these. that part is not on her. it's the responsibility of the
reconnectfunction to finish outstanding commands before reconnecting to the target port. periodt π - π«Ά it is the responsibility of the caller to ensure that the resources reallocated by the
reconnectfunction won't be used while this function is in progress. two possible strategies, your pick bestie:- invoke this function from the context of the SCSI EH thread only β¨
- or lock the
rportmutex inside each SCSI LLD callback that can be invoked by the SCSI EH β that's thescsi_host_template.eh_*()functions and also thescsi_host_template.queuecommandfunction π
lowkey important: those two notes are the whole safety situation. skip them and it's giving undefined chaos π
πΈ SEE ALSO
Kernel file ./drivers/scsi/scsi_transport_srp.c β and all her friends: srp_tmo_valid(9), srp_reconnect_work(9), rport_fast_io_fail_timedout(9), rport_dev_loss_timedout(9), srp_start_tl_fail_timers(9), srp_timed_out(9), srp_rport_get(9), srp_rport_put(9), srp_rport_add(9), srp_rport_del(9), srp_remove_host(9), srp_stop_rport_timers(9), srp_attach_transport(9), srp_release_transport(9) π
that's the whole page bestie, we ate π from ./drivers/scsi, dated October 2026 β mwah, go reconnect something π
β¨
π¦ 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