summaryrefslogtreecommitdiff
path: root/drivers/target/target_core_transport.c
diff options
context:
space:
mode:
authorMike Christie <michael.christie@oracle.com>2023-09-28 05:09:02 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2023-10-13 22:53:57 +0300
commitee48345e1ccaaa7a9f0a8b34c694a68286ac78fa (patch)
treedce0cb07a24c086166103153ec15e0e2a5f15262 /drivers/target/target_core_transport.c
parent194605d45dcb511983caca699d81855693b25fe0 (diff)
downloadlinux-ee48345e1ccaaa7a9f0a8b34c694a68286ac78fa.tar.xz
scsi: target: core: Move core_alua_check_nonop_delay() call
Move core_alua_check_nonop_delay() to transport_handle_cdb_direct() so the iSCSI target driver doesn't have to call as many core functions directly. We will eventually merge transport_handle_cdb_direct and target_submit so iSCSI and the other drivers call a common function. It will also be helpful as preparation for future changes which allow the iSCSI target to defer command submission to the LIO submission workqueue, because we will have a common submission function for that which will be based on transport_handle_cdb_direct()/target_submit(). Signed-off-by: Mike Christie <michael.christie@oracle.com> Link: https://lore.kernel.org/r/20230928020907.5730-3-michael.christie@oracle.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target/target_core_transport.c')
-rw-r--r--drivers/target/target_core_transport.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 687adc9e086c..a63f19bf47f8 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -1586,6 +1586,12 @@ int transport_handle_cdb_direct(
might_sleep();
+ /*
+ * Check if we need to delay processing because of ALUA
+ * Active/NonOptimized primary access state..
+ */
+ core_alua_check_nonop_delay(cmd);
+
if (!cmd->se_lun) {
dump_stack();
pr_err("cmd->se_lun is NULL\n");
@@ -1817,12 +1823,6 @@ void target_submit(struct se_cmd *se_cmd)
}
- /*
- * Check if we need to delay processing because of ALUA
- * Active/NonOptimized primary access state..
- */
- core_alua_check_nonop_delay(se_cmd);
-
transport_handle_cdb_direct(se_cmd);
}
EXPORT_SYMBOL_GPL(target_submit);