diff options
author | Tejun Heo <tj@kernel.org> | 2009-05-07 09:24:45 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-05-11 03:50:55 -0400 |
commit | 1011c1b9f2e45ce7c6e38888d2b83936aec38771 (patch) | |
tree | 63f1f8f604631f37df9917a941531de0148f8379 /drivers/block/ub.c | |
parent | a2dec7b36364a5cc564c4d76cf16d2e7d33f5c05 (diff) |
block: blk_rq_[cur_]_{sectors|bytes}() usage cleanup
With the previous changes, the followings are now guaranteed for all
requests in any valid state.
* blk_rq_sectors() == blk_rq_bytes() >> 9
* blk_rq_cur_sectors() == blk_rq_cur_bytes() >> 9
Clean up accessor usages. Notable changes are
* nbd,i2o_block: end_all used instead of explicit byte count
* scsi_lib: unnecessary conditional on request type removed
[ Impact: cleanup ]
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Paul Clements <paul.clements@steeleye.com>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Cc: Alex Dubov <oakad@yahoo.com>
Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block/ub.c')
-rw-r--r-- | drivers/block/ub.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/ub.c b/drivers/block/ub.c index 1591f61b6c60..40d03cf63f2e 100644 --- a/drivers/block/ub.c +++ b/drivers/block/ub.c | |||
@@ -739,7 +739,7 @@ static void ub_cmd_build_block(struct ub_dev *sc, struct ub_lun *lun, | |||
739 | cmd->cdb[8] = nblks; | 739 | cmd->cdb[8] = nblks; |
740 | cmd->cdb_len = 10; | 740 | cmd->cdb_len = 10; |
741 | 741 | ||
742 | cmd->len = blk_rq_sectors(rq) * 512; | 742 | cmd->len = blk_rq_bytes(rq); |
743 | } | 743 | } |
744 | 744 | ||
745 | static void ub_cmd_build_packet(struct ub_dev *sc, struct ub_lun *lun, | 745 | static void ub_cmd_build_packet(struct ub_dev *sc, struct ub_lun *lun, |