aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/target
diff options
context:
space:
mode:
authorMike Christie <michael.christie@oracle.com>2023-03-18 20:56:13 -0500
committerMartin K. Petersen <martin.petersen@oracle.com>2023-03-24 17:32:23 -0400
commit4edba7e4a8f39112398d3cda94128a8e13a7d527 (patch)
treef9ba054f1511293f229e05bf999a801f699fe621 /include/target
parentscsi: target: Move sess cmd counter to new struct (diff)
downloadwireguard-linux-4edba7e4a8f39112398d3cda94128a8e13a7d527.tar.xz
wireguard-linux-4edba7e4a8f39112398d3cda94128a8e13a7d527.zip
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>
Diffstat (limited to 'include/target')
-rw-r--r--include/target/target_core_fabric.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h
index 38f0662476d1..65527174b8bc 100644
--- a/include/target/target_core_fabric.h
+++ b/include/target/target_core_fabric.h
@@ -133,7 +133,9 @@ struct se_session *target_setup_session(struct se_portal_group *,
struct se_session *, void *));
void target_remove_session(struct se_session *);
-int transport_init_session(struct se_session *se_sess);
+struct target_cmd_counter *target_alloc_cmd_counter(void);
+
+void transport_init_session(struct se_session *se_sess);
struct se_session *transport_alloc_session(enum target_prot_op);
int transport_alloc_session_tags(struct se_session *, unsigned int,
unsigned int);