block: cleanup rq->data_len usages

With recent unification of fields, it's now guaranteed that
rq->data_len always equals blk_rq_bytes().  Convert all non-IDE direct
users to accessors.  IDE will be converted in a separate patch.

Boaz: spotted incorrect data_len/resid_len conversion in osd.

[ Impact: convert direct rq->data_len usages to blk_rq_bytes() ]

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Cc: Eric Moore <Eric.Moore@lsi.com>
Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
Cc: Darrick J. Wong <djwong@us.ibm.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Eric Moore <Eric.Moore@lsi.com>
Cc: Boaz Harrosh <bharrosh@panasas.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
Tejun Heo
2009-05-07 22:24:42 +09:00
committed by Jens Axboe
parent 2e46e8b27a
commit b079041030
10 changed files with 49 additions and 49 deletions

View File

@ -430,7 +430,7 @@ static void i2o_block_end_request(struct request *req, int error,
int leftover = (blk_rq_sectors(req) << KERNEL_SECTOR_SHIFT);
if (blk_pc_request(req))
leftover = req->data_len;
leftover = blk_rq_bytes(req);
if (error)
blk_end_request(req, -EIO, leftover);