diff options
author | Christoph Hellwig <hch@infradead.org> | 2012-04-23 11:35:30 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-05-06 15:02:59 -0700 |
commit | 72a0e5e2e2e6b577343c79013611ad5701e94482 (patch) | |
tree | 06e41f5240a98040a2a6eed30ab75c0c4213baf2 /drivers/target/target_core_iblock.c | |
parent | ed3102c678c6274933948f9097bb4e2b314e5f82 (diff) | |
download | linux-72a0e5e2e2e6b577343c79013611ad5701e94482.tar.bz2 |
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 <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_iblock.c')
-rw-r--r-- | drivers/target/target_core_iblock.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c index 2ec299e8a73e..311f43b3cffa 100644 --- a/drivers/target/target_core_iblock.c +++ b/drivers/target/target_core_iblock.c @@ -536,13 +536,13 @@ static int iblock_do_task(struct se_task *task) * struct se_task SCSI blocksize into Linux/Block 512 units for BIO. */ if (dev->se_sub_dev->se_dev_attrib.block_size == 4096) - block_lba = (task->task_lba << 3); + block_lba = (cmd->t_task_lba << 3); else if (dev->se_sub_dev->se_dev_attrib.block_size == 2048) - block_lba = (task->task_lba << 2); + block_lba = (cmd->t_task_lba << 2); else if (dev->se_sub_dev->se_dev_attrib.block_size == 1024) - block_lba = (task->task_lba << 1); + block_lba = (cmd->t_task_lba << 1); else if (dev->se_sub_dev->se_dev_attrib.block_size == 512) - block_lba = task->task_lba; + block_lba = cmd->t_task_lba; else { pr_err("Unsupported SCSI -> BLOCK LBA conversion:" " %u\n", dev->se_sub_dev->se_dev_attrib.block_size); @@ -646,7 +646,7 @@ static void iblock_bio_done(struct bio *bio, int err) return; pr_debug("done[%p] bio: %p task_lba: %llu bio_lba: %llu err=%d\n", - task, bio, task->task_lba, + task, bio, task->task_se_cmd->t_task_lba, (unsigned long long)bio->bi_sector, err); transport_complete_task(task, !atomic_read(&ibr->ib_bio_err_cnt)); |