* [PATCH] zfcp: defer fc_rport blocking until after ADISC response
@ 2023-07-24 14:51 Steffen Maier
2023-07-26 2:03 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Steffen Maier @ 2023-07-24 14:51 UTC (permalink / raw)
To: James E . J . Bottomley, Martin K . Petersen
Cc: linux-scsi, linux-s390, Benjamin Block, Heiko Carstens,
Vasily Gorbik, Christian Borntraeger, Steffen Maier
Storages 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>
---
drivers/s390/scsi/zfcp_fc.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c
index f21307537829..4f0d0e55f0d4 100644
--- a/drivers/s390/scsi/zfcp_fc.c
+++ b/drivers/s390/scsi/zfcp_fc.c
@@ -534,8 +534,7 @@ static void zfcp_fc_adisc_handler(void *data)
/* re-init to undo drop from zfcp_fc_adisc() */
port->d_id = ntoh24(adisc_resp->adisc_port_id);
- /* port is good, unblock rport without going through erp */
- zfcp_scsi_schedule_rport_register(port);
+ /* port is still good, nothing to do */
out:
atomic_andnot(ZFCP_STATUS_PORT_LINK_TEST, &port->status);
put_device(&port->dev);
@@ -595,9 +594,6 @@ void zfcp_fc_link_test_work(struct work_struct *work)
int retval;
set_worker_desc("zadisc%16llx", port->wwpn); /* < WORKER_DESC_LEN=24 */
- get_device(&port->dev);
- port->rport_task = RPORT_DEL;
- zfcp_scsi_rport_work(&port->rport_work);
/* only issue one test command at one time per port */
if (atomic_read(&port->status) & ZFCP_STATUS_PORT_LINK_TEST)
base-commit: 010c1e1c5741365dbbf44a5a5bb9f30192875c4c
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] zfcp: defer fc_rport blocking until after ADISC response
2023-07-24 14:51 [PATCH] zfcp: defer fc_rport blocking until after ADISC response Steffen Maier
@ 2023-07-26 2:03 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2023-07-26 2:03 UTC (permalink / raw)
To: James E . J . Bottomley, Steffen Maier
Cc: Martin K . Petersen, linux-scsi, linux-s390, Benjamin Block,
Heiko Carstens, Vasily Gorbik, Christian Borntraeger
On Mon, 24 Jul 2023 16:51:56 +0200, Steffen Maier wrote:
> Storages 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.
>
> [...]
Applied to 6.5/scsi-fixes, thanks!
[1/1] zfcp: defer fc_rport blocking until after ADISC response
https://git.kernel.org/mkp/scsi/c/e65851989001
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-26 2:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-24 14:51 [PATCH] zfcp: defer fc_rport blocking until after ADISC response Steffen Maier
2023-07-26 2:03 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox