]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: target: Move sess cmd counter to new struct
authorMike Christie <michael.christie@oracle.com>
Sun, 19 Mar 2023 01:56:12 +0000 (20:56 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2023 14:11:09 +0000 (23:11 +0900)
commitbc5ebf93ae23a928303b3643c6f4c4da2f769e7c
tree31c5e268807a6aff56d017f0dfe73845638712f2
parent7510fd5f24a94a59eb61839077019af43d283420
scsi: target: Move sess cmd counter to new struct

[ Upstream commit becd9be6069e7b183c084f460f0eb363e43cc487 ]

iSCSI needs to wait on outstanding commands like how SRP and the FC/FCoE
drivers do. It can't use target_stop_session() because for MCS support we
can't stop the entire session during recovery because if other connections
are OK then we want to be able to continue to execute I/O on them.

Move the per session cmd counters to a new struct so iSCSI can allocate
them per connection. The xcopy code can also just not allocate in the
future since it doesn't need to track commands.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
Link: https://lore.kernel.org/r/20230319015620.96006-2-michael.christie@oracle.com
Reviewed-by: Maurizio Lombardi <mlombard@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Stable-dep-of: 395cee83d02d ("scsi: target: iscsit: Stop/wait on cmds during conn close")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/target/target_core_tpg.c
drivers/target/target_core_transport.c
include/target/iscsi/iscsi_target_core.h
include/target/target_core_base.h