aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/bio.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-01-24 10:11:06 +0100
committerJens Axboe <axboe@kernel.dk>2022-02-02 07:49:59 -0700
commit49add4966d79244013fce35f95c6833fae82b8b1 (patch)
tree915dec99a236142c08e4b0ac94346f178d467987 /include/linux/bio.h
parentblock: pass a block_device and opf to bio_alloc (diff)
downloadlinux-dev-49add4966d79244013fce35f95c6833fae82b8b1.tar.xz
linux-dev-49add4966d79244013fce35f95c6833fae82b8b1.zip
block: pass a block_device and opf to bio_init
Pass the block_device that we plan to use this bio for and the operation to bio_init to optimize the assignment. A NULL block_device can be passed, both for the passthrough case on a raw request_queue and to temporarily avoid refactoring some nasty code. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Link: https://lore.kernel.org/r/20220124091107.642561-19-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/bio.h')
-rw-r--r--include/linux/bio.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h
index be6ac92913d4..41bedf727f59 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -456,8 +456,8 @@ static inline int bio_iov_vecs_to_alloc(struct iov_iter *iter, int max_segs)
struct request_queue;
extern int submit_bio_wait(struct bio *bio);
-extern void bio_init(struct bio *bio, struct bio_vec *table,
- unsigned short max_vecs);
+void bio_init(struct bio *bio, struct block_device *bdev, struct bio_vec *table,
+ unsigned short max_vecs, unsigned int opf);
extern void bio_uninit(struct bio *);
extern void bio_reset(struct bio *);
void bio_chain(struct bio *, struct bio *);