[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49FEF174.6040505@ru.mvista.com>
Date: Mon, 04 May 2009 17:45:24 +0400
From: Sergei Shtylyov <sshtylyov@...mvista.com>
To: Tejun Heo <tj@...nel.org>
Cc: axboe@...nel.dk, linux-kernel@...r.kernel.org, jeff@...zik.org,
linux-ide@...r.kernel.org, James.Bottomley@...senPartnership.com,
linux-scsi@...r.kernel.org, bzolnier@...il.com,
petkovbb@...glemail.com, mike.miller@...com, Eric.Moore@....com,
stern@...land.harvard.edu, fujita.tomonori@....ntt.co.jp,
zaitcev@...hat.com, Geert.Uytterhoeven@...ycom.com,
sfr@...b.auug.org.au, grant.likely@...retlab.ca,
paul.clements@...eleye.com, tim@...erelk.net, jeremy@...source.com,
adrian@...en.demon.co.uk, oakad@...oo.com, dwmw2@...radead.org,
schwidefsky@...ibm.com, ballabio_dario@....com,
davem@...emloft.net, rusty@...tcorp.com.au,
Markus.Lidel@...dowconnect.com, bharrosh@...asas.com
Subject: Re: [PATCH 04/11] block: implement blk_rq_pos/[cur_]sectors() and
convert obvious ones
Tejun Heo wrote:
> Implement accessors - blk_rq_pos(), blk_rq_sectors() and
> blk_rq_cur_sectors() which return rq->sector, rq->hard_nr_sectors and
Well, blk_rq_pos() returns rq->hard_sector, not rq->sector, doesn't it?
> 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.
> const added to struct request * parameter to accessors as suggested by
> Geert Uytterhoeven.
> [ Impact: cleanup ]
> Signed-off-by: Tejun Heo <tj@...nel.org>
> Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.com>
> Acked-by: Stephen Rothwell <sfr@...b.auug.org.au>
> Tested-by: Grant Likely <grant.likely@...retlab.ca>
> Acked-by: Grant Likely <grant.likely@...retlab.ca>
Acked-by: Sergei Shtylyov <sshtylyov@...mvista.com>
> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> index 7ab93d9..b921d91 100644
> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -833,13 +833,30 @@ static inline void blk_run_address_space(struct address_space *mapping)
> extern void blkdev_dequeue_request(struct request *req);
>
> /*
> - * blk_end_request() takes bytes instead of sectors as a complete size.
> - * blk_rq_bytes() returns bytes left to complete in the entire request.
> - * blk_rq_cur_bytes() returns bytes left to complete in the current segment.
> + * blk_rq_pos() : the current sector
> + * blk_rq_bytes() : bytes left in the entire request
> + * blk_rq_cur_bytes() : bytes left in the current segment
> + * blk_rq_sectors() : sectors left in the entire request
> + * blk_rq_cur_sectors() : sectors left in the current segment
> */
> +static inline sector_t blk_rq_pos(const struct request *rq)
> +{
> + return rq->hard_sector;
> +}
> +
[...]
MBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists