aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/bio.h
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-08-28 03:17:06 -0400
committerJens Axboe <jens.axboe@oracle.com>2008-10-09 02:56:10 -0400
commit152e283fdfea0cd11e297d982378b55937842dde (patch)
treea97a57108353f167a1e2911e8ee09c527ef42d3e /include/linux/bio.h
parenta3bce90edd8f6cafe3f63b1a943800792e830178 (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.h8
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 *);
327extern struct bio *bio_map_user(struct request_queue *, struct block_device *, 327extern 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);
329struct sg_iovec; 329struct sg_iovec;
330struct rq_map_data;
330extern struct bio *bio_map_user_iov(struct request_queue *, 331extern 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);
338extern void bio_set_pages_dirty(struct bio *bio); 339extern void bio_set_pages_dirty(struct bio *bio);
339extern void bio_check_pages_dirty(struct bio *bio); 340extern void bio_check_pages_dirty(struct bio *bio);
340extern struct bio *bio_copy_user(struct request_queue *, unsigned long, 341extern 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);
342extern struct bio *bio_copy_user_iov(struct request_queue *, struct sg_iovec *, 343extern 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);
344extern int bio_uncopy_user(struct bio *); 346extern int bio_uncopy_user(struct bio *);
345void zero_fill_bio(struct bio *bio); 347void zero_fill_bio(struct bio *bio);