Skip to content
Commit 5b93629b authored by Tejun Heo's avatar Tejun Heo Committed by Jens Axboe
Browse files

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: default avatarTejun Heo <tj@kernel.org>
Acked-by: default avatarGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Tested-by: default avatarGrant Likely <grant.likely@secretlab.ca>
Acked-by: default avatarGrant Likely <grant.likely@secretlab.ca>
Ackec-by: default avatarSergei 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: default avatarJens Axboe <jens.axboe@oracle.com>
parent c3a4d78c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment