diff options
author | Christoph Hellwig <hch@infradead.org> | 2012-04-23 17:35:33 +0200 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-05-07 00:11:14 +0200 |
commit | 6bb35e009b656b36f7985057822c5fbf53ea75b7 (patch) | |
tree | 31384150dbd2828ee72a0802efb23692511f032f /drivers/target/target_core_alua.c | |
parent | target: remove the task_sectors field in struct se_task (diff) | |
download | linux-6bb35e009b656b36f7985057822c5fbf53ea75b7.tar.xz linux-6bb35e009b656b36f7985057822c5fbf53ea75b7.zip |
target: replace ->execute_task with ->execute_cmd
Make CDB emulation work on commands instead of tasks again as a preparation
of removing tasks completely.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_alua.c')
-rw-r--r-- | drivers/target/target_core_alua.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/target/target_core_alua.c b/drivers/target/target_core_alua.c index c7746a3339d4..c39ae7cd9895 100644 --- a/drivers/target/target_core_alua.c +++ b/drivers/target/target_core_alua.c @@ -59,9 +59,8 @@ struct t10_alua_lu_gp *default_lu_gp; * * See spc4r17 section 6.27 */ -int target_emulate_report_target_port_groups(struct se_task *task) +int target_emulate_report_target_port_groups(struct se_cmd *cmd) { - struct se_cmd *cmd = task->task_se_cmd; struct se_subsystem_dev *su_dev = cmd->se_dev->se_sub_dev; struct se_port *port; struct t10_alua_tg_pt_gp *tg_pt_gp; @@ -166,8 +165,7 @@ int target_emulate_report_target_port_groups(struct se_task *task) transport_kunmap_data_sg(cmd); - task->task_scsi_status = GOOD; - transport_complete_task(task, 1); + target_complete_cmd(cmd, GOOD); return 0; } @@ -176,9 +174,8 @@ int target_emulate_report_target_port_groups(struct se_task *task) * * See spc4r17 section 6.35 */ -int target_emulate_set_target_port_groups(struct se_task *task) +int target_emulate_set_target_port_groups(struct se_cmd *cmd) { - struct se_cmd *cmd = task->task_se_cmd; struct se_device *dev = cmd->se_dev; struct se_subsystem_dev *su_dev = dev->se_sub_dev; struct se_port *port, *l_port = cmd->se_lun->lun_sep; @@ -351,8 +348,7 @@ int target_emulate_set_target_port_groups(struct se_task *task) out: transport_kunmap_data_sg(cmd); - task->task_scsi_status = GOOD; - transport_complete_task(task, 1); + target_complete_cmd(cmd, GOOD); return 0; } |