Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: zfcp: Defer fc_rport blocking until after ADISC response

Storage devices are free to send RSCNs, e.g. for internal state changes. If
this happens on all connected paths, zfcp risks temporarily losing all
paths at the same time. This has strong requirements on multipath
configuration such as "no_path_retry queue".

Avoid such situations by deferring fc_rport blocking until after the ADISC
response, when any actual state change of the remote port became clear.
The already existing port recovery triggers explicitly block the fc_rport.
The triggers are: on ADISC reject or timeout (typical cable pull case), and
on ADISC indicating that the remote port has changed its WWPN or
the port is meanwhile no longer open.

As a side effect, this also removes a confusing direct function call to
another work item function zfcp_scsi_rport_work() instead of scheduling
that other work item. It was probably done that way to have the rport block
side effect immediate and synchronous to the caller.

Fixes: a2fa0aede07c ("[SCSI] zfcp: Block FC transport rports early on errors")
Cc: stable@vger.kernel.org #v2.6.30+
Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
Reviewed-by: Fedor Loshakov <loshakov@linux.ibm.com>
Signed-off-by: Steffen Maier <maier@linux.ibm.com>
Link: https://lore.kernel.org/r/20230724145156.3920244-1-maier@linux.ibm.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Steffen Maier and committed by
Martin K. Petersen
e6585198 010c1e1c

+1 -5
+1 -5
drivers/s390/scsi/zfcp_fc.c
··· 534 534 535 535 /* re-init to undo drop from zfcp_fc_adisc() */ 536 536 port->d_id = ntoh24(adisc_resp->adisc_port_id); 537 - /* port is good, unblock rport without going through erp */ 538 - zfcp_scsi_schedule_rport_register(port); 537 + /* port is still good, nothing to do */ 539 538 out: 540 539 atomic_andnot(ZFCP_STATUS_PORT_LINK_TEST, &port->status); 541 540 put_device(&port->dev); ··· 594 595 int retval; 595 596 596 597 set_worker_desc("zadisc%16llx", port->wwpn); /* < WORKER_DESC_LEN=24 */ 597 - get_device(&port->dev); 598 - port->rport_task = RPORT_DEL; 599 - zfcp_scsi_rport_work(&port->rport_work); 600 598 601 599 /* only issue one test command at one time per port */ 602 600 if (atomic_read(&port->status) & ZFCP_STATUS_PORT_LINK_TEST)