]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: iscsi: Add helper to remove a session from the kernel
authorMike Christie <michael.christie@oracle.com>
Thu, 16 Jun 2022 22:27:36 +0000 (17:27 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:44 +0000 (14:23 +0200)
commit7c0459d2f936a93b5c2d5bade4b7dd2d54f58eab
tree54f2023b42b0b6b577c1703f32dabd063659095d
parente2ad7ac7fa9fd6f02f99f75b8e88f47523d21d63
scsi: iscsi: Add helper to remove a session from the kernel

[ Upstream commit 15a65d7c507d37716349c45f01307c7980158a51 ]

During qedi shutdown we need to stop the iSCSI layer from sending new nops
as pings and from responding to target ones and make sure there is no
running connection cleanups. Commit c55cd560a09b ("scsi: qedi: Fix host
removal with running sessions") converted the driver to use the libicsi
helper to drive session removal, so the above issues could be handled. The
problem is that during system shutdown iscsid will not be running so when
we try to remove the root session we will hang waiting for userspace to
reply.

Add a helper that will drive the destruction of sessions like these during
system shutdown.

Link: https://lore.kernel.org/r/20220616222738.5722-5-michael.christie@oracle.com
Tested-by: Nilesh Javali <njavali@marvell.com>
Reviewed-by: Nilesh Javali <njavali@marvell.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
include/scsi/scsi_transport_iscsi.h