[Drbd-dev] [PATCH 3/3] drbd: use bio_alloc_clone() instead of bio_clone_fast()

Christoph Böhmwalder christoph.boehmwalder at linbit.com
Fri Sep 30 19:02:45 CEST 2022


Am 08.09.22 um 23:13 schrieb Michael D Labriola:
> Between 5.17 and 5.18, bio_clone_fast() was modified to take a
> block_device and the function was renamed.  This commit migrates to
> the new usage.
> 
> Upstream commits:
> abfc426d block: pass a block_device to bio_clone_fast
> 
> Signed-off-by: Michael D Labriola <veggiemike at sourceruckus.org>
> ---
>  drbd/drbd_req.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drbd/drbd_req.c b/drbd/drbd_req.c
> index fc7dfb8d..06ba8ce8 100644
> --- a/drbd/drbd_req.c
> +++ b/drbd/drbd_req.c
> @@ -1715,7 +1715,7 @@ drbd_request_prepare(struct drbd_device *device, struct bio *bio,
>  	req->start_jif = bio_start_io_acct(req->master_bio);
>  
>  	if (get_ldev(device)) {
> -		req->private_bio  = bio_clone_fast(bio, GFP_NOIO, &drbd_io_bio_set);
> +		req->private_bio  = bio_alloc_clone(bio->bi_bdev, bio, GFP_NOIO, &drbd_io_bio_set);
>  		req->private_bio->bi_private = req;
>  		req->private_bio->bi_end_io = drbd_request_endio;
>  	}

Thanks for the patch!

Applied as
https://github.com/LINBIT/drbd/commit/945b5e58ad1761c1f6e874e0db7aee7f42d11827.

(And fixed up in
https://github.com/LINBIT/drbd/commit/7e7111b94b8ef100a6e3b5fea084105122ad0546
;)

-- 
Christoph Böhmwalder
LINBIT | Keeping the Digital World Running
DRBD HA —  Disaster Recovery — Software defined Storage


More information about the drbd-dev mailing list