diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2008-08-28 03:17:06 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-10-09 02:56:10 -0400 |
commit | 152e283fdfea0cd11e297d982378b55937842dde (patch) | |
tree | a97a57108353f167a1e2911e8ee09c527ef42d3e /include/linux/bio.h | |
parent | a3bce90edd8f6cafe3f63b1a943800792e830178 (diff) |
block: introduce struct rq_map_data to use reserved pages
This patch introduces struct rq_map_data to enable bio_copy_use_iov()
use reserved pages.
Currently, bio_copy_user_iov allocates bounce pages but
drivers/scsi/sg.c wants to allocate pages by itself and use
them. struct rq_map_data can be used to pass allocated pages to
bio_copy_user_iov.
The current users of bio_copy_user_iov simply passes NULL (they don't
want to use pre-allocated pages).
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Douglas Gilbert <dougg@torque.net>
Cc: Mike Christie <michaelc@cs.wisc.edu>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux/bio.h')
-rw-r--r-- | include/linux/bio.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index 200b185c3e83..bc386cd5e996 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -327,6 +327,7 @@ extern int bio_get_nr_vecs(struct block_device *); | |||
327 | extern struct bio *bio_map_user(struct request_queue *, struct block_device *, | 327 | extern struct bio *bio_map_user(struct request_queue *, struct block_device *, |
328 | unsigned long, unsigned int, int, gfp_t); | 328 | unsigned long, unsigned int, int, gfp_t); |
329 | struct sg_iovec; | 329 | struct sg_iovec; |
330 | struct rq_map_data; | ||
330 | extern struct bio *bio_map_user_iov(struct request_queue *, | 331 | extern struct bio *bio_map_user_iov(struct request_queue *, |
331 | struct block_device *, | 332 | struct block_device *, |
332 | struct sg_iovec *, int, int, gfp_t); | 333 | struct sg_iovec *, int, int, gfp_t); |
@@ -337,9 +338,10 @@ extern struct bio *bio_copy_kern(struct request_queue *, void *, unsigned int, | |||
337 | gfp_t, int); | 338 | gfp_t, int); |
338 | extern void bio_set_pages_dirty(struct bio *bio); | 339 | extern void bio_set_pages_dirty(struct bio *bio); |
339 | extern void bio_check_pages_dirty(struct bio *bio); | 340 | extern void bio_check_pages_dirty(struct bio *bio); |
340 | extern struct bio *bio_copy_user(struct request_queue *, unsigned long, | 341 | extern struct bio *bio_copy_user(struct request_queue *, struct rq_map_data *, |
341 | unsigned int, int, gfp_t); | 342 | unsigned long, unsigned int, int, gfp_t); |
342 | extern struct bio *bio_copy_user_iov(struct request_queue *, struct sg_iovec *, | 343 | extern struct bio *bio_copy_user_iov(struct request_queue *, |
344 | struct rq_map_data *, struct sg_iovec *, | ||
343 | int, int, gfp_t); | 345 | int, int, gfp_t); |
344 | extern int bio_uncopy_user(struct bio *); | 346 | extern int bio_uncopy_user(struct bio *); |
345 | void zero_fill_bio(struct bio *bio); | 347 | void zero_fill_bio(struct bio *bio); |