]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: iscsi: Unblock session then wake up error handler
authorMike Christie <michael.christie@oracle.com>
Fri, 5 Nov 2021 22:10:47 +0000 (17:10 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 17 Nov 2021 00:42:30 +0000 (19:42 -0500)
commit6cde98f8befde208638c6d36b9d1e82626aa30e8
treec08c54302255e9432e1810bb437f2e3c0377933f
parentf1c9b20cdd88ca152f2f966a26a51fae7b8b4bbe
scsi: iscsi: Unblock session then wake up error handler

We can race where iscsi_session_recovery_timedout() has woken up the error
handler thread and it's now setting the devices to offline, and
session_recovery_timedout()'s call to scsi_target_unblock() is also trying
to set the device's state to transport-offline. We can then get a mix of
states.

For the case where we can't relogin we want the devices to be in
transport-offline so when we have repaired the connection
__iscsi_unblock_session() can set the state back to running.

Set the device state then call into libiscsi to wake up the error handler.

Link: https://lore.kernel.org/r/20211105221048.6541-2-michael.christie@oracle.com
Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_transport_iscsi.c