diff options
author | Kent Overstreet <kmo@daterainc.com> | 2015-01-18 10:16:31 -0500 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-02-05 11:30:40 -0500 |
commit | 26e49cfc7e988a76bf1e55cef0d9e438e5489180 (patch) | |
tree | 43a2a3590738ef4097b63719e35fcc761a66e844 /include/linux/bio.h | |
parent | 1dfa0f68c040080c5fefa7211b4ec34d202f8570 (diff) |
block: pass iov_iter to the BLOCK_PC mapping functions
Make use of a new interface provided by iov_iter, backed by
scatter-gather list of iovec, instead of the old interface based on
sg_iovec. Also use iov_iter_advance() instead of manual iteration.
This commit should contain only literal replacements, without
functional changes.
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Doug Gilbert <dgilbert@interlog.com>
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
[dpark: add more description in commit message]
Signed-off-by: Dongsu Park <dongsu.park@profitbricks.com>
[hch: fixed to do a deep clone of the iov_iter, and to properly use
the iov_iter direction]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/bio.h')
-rw-r--r-- | include/linux/bio.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index d0d6735d61da..0d6105b34ffa 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -428,11 +428,10 @@ extern int bio_add_page(struct bio *, struct page *, unsigned int,unsigned int); | |||
428 | extern int bio_add_pc_page(struct request_queue *, struct bio *, struct page *, | 428 | extern int bio_add_pc_page(struct request_queue *, struct bio *, struct page *, |
429 | unsigned int, unsigned int); | 429 | unsigned int, unsigned int); |
430 | extern int bio_get_nr_vecs(struct block_device *); | 430 | extern int bio_get_nr_vecs(struct block_device *); |
431 | struct sg_iovec; | ||
432 | struct rq_map_data; | 431 | struct rq_map_data; |
433 | extern struct bio *bio_map_user_iov(struct request_queue *, | 432 | extern struct bio *bio_map_user_iov(struct request_queue *, |
434 | struct block_device *, | 433 | struct block_device *, |
435 | const struct sg_iovec *, int, int, gfp_t); | 434 | const struct iov_iter *, gfp_t); |
436 | extern void bio_unmap_user(struct bio *); | 435 | extern void bio_unmap_user(struct bio *); |
437 | extern struct bio *bio_map_kern(struct request_queue *, void *, unsigned int, | 436 | extern struct bio *bio_map_kern(struct request_queue *, void *, unsigned int, |
438 | gfp_t); | 437 | gfp_t); |
@@ -462,8 +461,8 @@ extern int bio_alloc_pages(struct bio *bio, gfp_t gfp); | |||
462 | 461 | ||
463 | extern struct bio *bio_copy_user_iov(struct request_queue *, | 462 | extern struct bio *bio_copy_user_iov(struct request_queue *, |
464 | struct rq_map_data *, | 463 | struct rq_map_data *, |
465 | const struct sg_iovec *, | 464 | const struct iov_iter *, |
466 | int, int, gfp_t); | 465 | gfp_t); |
467 | extern int bio_uncopy_user(struct bio *); | 466 | extern int bio_uncopy_user(struct bio *); |
468 | void zero_fill_bio(struct bio *bio); | 467 | void zero_fill_bio(struct bio *bio); |
469 | extern struct bio_vec *bvec_alloc(gfp_t, int, unsigned long *, mempool_t *); | 468 | extern struct bio_vec *bvec_alloc(gfp_t, int, unsigned long *, mempool_t *); |