]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: iscsi: Force immediate failure during shutdown
authorMike Christie <michael.christie@oracle.com>
Tue, 25 May 2021 18:17:57 +0000 (13:17 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 15:00:16 +0000 (17:00 +0200)
commit9dee19f54851b2feb27956a1f9ebc6bf585c0caa
treeb9947fce2406d81ae1aa21e4dca944469e80ed77
parent856d2c1684396c7e33581c6c008f7e3c4ddfec78
scsi: iscsi: Force immediate failure during shutdown

[ Upstream commit 06c203a5566beecebb1f8838d026de8a61c8df71 ]

If the system is not up, we can just fail immediately since iscsid is not
going to ever answer our netlink events. We are already setting the
recovery_tmo to 0, but by passing stop_conn STOP_CONN_TERM we never will
block the session and start the recovery timer, because for that flag
userspace will do the unbind and destroy events which would remove the
devices and wake up and kill the eh.

Since the conn is dead and the system is going dowm this just has us use
STOP_CONN_RECOVER with recovery_tmo=0 so we fail immediately. However, if
the user has set the recovery_tmo=-1 we let the system hang like they
requested since they might have used that setting for specific reasons
(one known reason is for buggy cluster software).

Link: https://lore.kernel.org/r/20210525181821.7617-5-michael.christie@oracle.com
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/scsi_transport_iscsi.c