diff options
author | Christoph Hellwig <hch@lst.de> | 2022-01-24 10:11:06 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-02-02 15:49:59 +0100 |
commit | 49add4966d79244013fce35f95c6833fae82b8b1 (patch) | |
tree | 915dec99a236142c08e4b0ac94346f178d467987 /drivers/md/md-multipath.c | |
parent | block: pass a block_device and opf to bio_alloc (diff) | |
download | linux-49add4966d79244013fce35f95c6833fae82b8b1.tar.xz linux-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 'drivers/md/md-multipath.c')
-rw-r--r-- | drivers/md/md-multipath.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/md-multipath.c b/drivers/md/md-multipath.c index e7d6486f090f..5e15940634d8 100644 --- a/drivers/md/md-multipath.c +++ b/drivers/md/md-multipath.c @@ -121,7 +121,7 @@ static bool multipath_make_request(struct mddev *mddev, struct bio * bio) } multipath = conf->multipaths + mp_bh->path; - bio_init(&mp_bh->bio, NULL, 0); + bio_init(&mp_bh->bio, NULL, NULL, 0, 0); __bio_clone_fast(&mp_bh->bio, bio); mp_bh->bio.bi_iter.bi_sector += multipath->rdev->data_offset; |