From 72a0e5e2e2e6b577343c79013611ad5701e94482 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 23 Apr 2012 11:35:30 -0400 Subject: target: remove the task_lba field in struct se_task Now that we don't split commands the lba field in the task is always equivalent to the one in the CDB, even in cases where we have two tasks due to a BIDI transfer. Just refer the the lba in the command instead of duplicating it in the task. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- drivers/target/target_core_rd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers/target/target_core_rd.c') diff --git a/drivers/target/target_core_rd.c b/drivers/target/target_core_rd.c index 35c64d1e09d..0bec5729d07 100644 --- a/drivers/target/target_core_rd.c +++ b/drivers/target/target_core_rd.c @@ -303,7 +303,8 @@ static int rd_do_task(struct se_task *task) u32 src_len; u64 tmp; - tmp = task->task_lba * se_dev->se_sub_dev->se_dev_attrib.block_size; + tmp = task->task_se_cmd->t_task_lba * + se_dev->se_sub_dev->se_dev_attrib.block_size; rd_offset = do_div(tmp, PAGE_SIZE); rd_page = tmp; rd_size = task->task_size; @@ -318,7 +319,8 @@ static int rd_do_task(struct se_task *task) dev->rd_dev_id, task->task_data_direction == DMA_FROM_DEVICE ? "Read" : "Write", - task->task_lba, rd_size, rd_page, rd_offset); + task->task_se_cmd->t_task_lba, + rd_size, rd_page, rd_offset); src_len = PAGE_SIZE - rd_offset; sg_miter_start(&m, task->task_sg, task->task_sg_nents, -- cgit v1.2.3