summaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorAndy Grover <agrover@redhat.com>2012-04-03 15:51:23 -0700
committerNicholas Bellinger <nab@linux-iscsi.org>2012-04-14 17:40:37 -0700
commit065ca1e42ffd74dd03cf60f61cead35934c91ed5 (patch)
tree0b346d469892ba835b8bb85f23b74c490c6d3af3 /drivers/target
parentd28b11692e6ec577cec70606d793e14843124a03 (diff)
downloadop-kernel-dev-065ca1e42ffd74dd03cf60f61cead35934c91ed5.zip
op-kernel-dev-065ca1e42ffd74dd03cf60f61cead35934c91ed5.tar.gz
target/iscsi: Move init_se_cmd closer to lookup_cmd_lun
if we can get calls to init_se_cmd, get_sess_cmd, lookup_cmd_lun, core_alua_check_nonop_delay, and handle_cdb_direct next to each other, then we can just call target_submit_cmd. This is a step towards that goal. Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/iscsi/iscsi_target.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index 57cef3b..1b51a3e 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -988,17 +988,6 @@ done:
sam_task_attr = MSG_SIMPLE_TAG;
}
- /*
- * Initialize struct se_cmd descriptor from target_core_mod infrastructure
- */
- transport_init_se_cmd(&cmd->se_cmd, &lio_target_fabric_configfs->tf_ops,
- conn->sess->se_sess, cmd->data_length, cmd->data_direction,
- sam_task_attr, &cmd->sense_buffer[0]);
-
- pr_debug("Got SCSI Command, ITT: 0x%08x, CmdSN: 0x%08x,"
- " ExpXferLen: %u, Length: %u, CID: %hu\n", hdr->itt,
- hdr->cmdsn, hdr->data_length, payload_length, conn->cid);
-
cmd->iscsi_opcode = ISCSI_OP_SCSI_CMD;
cmd->i_state = ISTATE_NEW_CMD;
cmd->immediate_cmd = ((hdr->opcode & ISCSI_OP_IMMEDIATE) ? 1 : 0);
@@ -1034,6 +1023,17 @@ done:
}
/*
+ * Initialize struct se_cmd descriptor from target_core_mod infrastructure
+ */
+ transport_init_se_cmd(&cmd->se_cmd, &lio_target_fabric_configfs->tf_ops,
+ conn->sess->se_sess, cmd->data_length, cmd->data_direction,
+ sam_task_attr, &cmd->sense_buffer[0]);
+
+ pr_debug("Got SCSI Command, ITT: 0x%08x, CmdSN: 0x%08x,"
+ " ExpXferLen: %u, Length: %u, CID: %hu\n", hdr->itt,
+ hdr->cmdsn, hdr->data_length, payload_length, conn->cid);
+
+ /*
* The CDB is going to an se_device_t.
*/
ret = transport_lookup_cmd_lun(&cmd->se_cmd,
OpenPOWER on IntegriCloud