block: implement blk_rq_pos/[cur_]sectors() and convert obvious ones
authorTejun Heo <tj@kernel.org>
Thu, 7 May 2009 13:24:38 +0000 (22:24 +0900)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 11 May 2009 07:50:53 +0000 (09:50 +0200)
commit5b93629b4509c03ffa87a9316412fedf6f58cb37
treead5ceda3f718361b8df3057b4f9edcc79aa4cd9d
parentc3a4d78c580de4edc9ef0f7c59812fb02ceb037f
block: implement blk_rq_pos/[cur_]sectors() and convert obvious ones

Implement accessors - blk_rq_pos(), blk_rq_sectors() and
blk_rq_cur_sectors() which return rq->hard_sector, rq->hard_nr_sectors
and rq->hard_cur_sectors respectively and convert direct references of
the said fields to the accessors.

This is in preparation of request data length handling cleanup.

Geert : suggested adding const to struct request * parameter to accessors
Sergei : spotted error in patch description

[ Impact: cleanup ]

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Tested-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Ackec-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Borislav Petkov <petkovbb@googlemail.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 files changed:
block/blk-barrier.c
block/blk-core.c
block/cfq-iosched.c
drivers/block/ps3disk.c
drivers/block/viodasd.c
drivers/block/xsysace.c
drivers/ide/ide-cd.c
drivers/ide/ide-io.c
drivers/message/i2o/i2o_block.c
drivers/scsi/scsi_lib.c
include/linux/blkdev.h
kernel/trace/blktrace.c