block: Add bio_copy_data()

This gets open coded quite a bit and it's tricky to get right, so make a
generic version and convert some existing users over to it instead.

Signed-off-by: Kent Overstreet <koverstreet@google.com>
CC: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Kent Overstreet
2012-09-10 13:57:51 -07:00
parent b783863f68
commit 16ac3d63e7
2 changed files with 72 additions and 0 deletions

View File

@@ -286,6 +286,8 @@ static inline void bio_flush_dcache_pages(struct bio *bi)
}
#endif
extern void bio_copy_data(struct bio *dst, struct bio *src);
extern struct bio *bio_copy_user(struct request_queue *, struct rq_map_data *,
unsigned long, unsigned int, int, gfp_t);
extern struct bio *bio_copy_user_iov(struct request_queue *,