OSDN Git Service

scsi: target: Move cmd counter allocation
authorMike Christie <michael.christie@oracle.com>
Sun, 19 Mar 2023 01:56:13 +0000 (20:56 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 24 Mar 2023 21:32:23 +0000 (17:32 -0400)
commit4edba7e4a8f39112398d3cda94128a8e13a7d527
treef9ba054f1511293f229e05bf999a801f699fe621
parentbecd9be6069e7b183c084f460f0eb363e43cc487
scsi: target: Move cmd counter allocation

iSCSI needs to allocate its cmd counter per connection for MCS support
where we need to stop and wait on commands running on a connection instead
of per session. This moves the cmd counter allocation to
target_setup_session() which is used by drivers that need the stop+wait
behavior per session.

xcopy doesn't need stop+wait at all, so we will be OK moving the cmd
counter allocation outside of transport_init_session().

Signed-off-by: Mike Christie <michael.christie@oracle.com>
Link: https://lore.kernel.org/r/20230319015620.96006-3-michael.christie@oracle.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/iscsi/iscsi_target_login.c
drivers/target/target_core_internal.h
drivers/target/target_core_transport.c
drivers/target/target_core_xcopy.c
include/target/target_core_fabric.h