drbd/bsc-1201335_08-bio_clone_fast.patch
Roger Zhou 1eb6b25c2a Accepting request 987977 from home:hmzhao:branches:network:ha-clustering:Factory
- drbd: build error against kernel v5.18 (bsc#1201335)
  - remove patch: move_bdi_from_request_queue_to_gendisk
  - change exist patches name from bsc#1192929:
    old name:
      make_block_holder_optional.patch
      move_kvmalloc_related_to_slab.patch
      polling_to_bio_base.patch
      pass_gend_to_blk_queue_update_readahead.patch
      dax_support.patch
      add_disk_error_handle.patch
      have_void_drbd_submit_bio.patch
      remove_bdgrab.patch
    new name:
      bsc-1192929_01-make_block_holder_optional.patch
      bsc-1192929_02-move_kvmalloc_related_to_slab.patch
      bsc-1192929_03-polling_to_bio_base.patch
      bsc-1192929_04-pass_gend_to_blk_queue_update_readahead.patch
      bsc-1192929_06-dax_support.patch
      bsc-1192929_07-add_disk_error_handle.patch
      bsc-1192929_08-have_void_drbd_submit_bio.patch
      bsc-1192929_09-remove_bdgrab.patch
  - add patch:
    + bsc-1201335_01-compat-test-and-cocci-patch-for-bdi-in-gendisk.patch
    + bsc-1201335_02-0001-compat-only-apply-bdi-pointer-patch-if-bdi-is-in-req.patch
    + bsc-1201335_03-genhd.patch
    + bsc-1201335_04-bio_alloc_bioset.patch
    + bsc-1201335_05-bio_alloc.patch
    + bsc-1201335_06-bdi.patch
    + bsc-1201335_07-write-same.patch
    + bsc-1201335_08-bio_clone_fast.patch

OBS-URL: https://build.opensuse.org/request/show/987977
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=137
2022-07-09 00:28:28 +00:00

31 lines
1.1 KiB
Diff

/* this patch is related with following upstream kernel commit */
commit abfc426d1b2fb2176df59851a64223b58ddae7e7
Author: Christoph Hellwig <hch@lst.de>
Date: Wed Feb 2 17:01:09 2022 +0100
block: pass a block_device to bio_clone_fast
Pass a block_device to bio_clone_fast and __bio_clone_fast and give
the functions more suitable names.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mike Snitzer <snitzer@redhat.com>
Link: https://lore.kernel.org/r/20220202160109.108149-14-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
diff -Nupr a/drbd/drbd_req.c b/drbd/drbd_req.c
--- a/drbd/drbd_req.c 2022-07-08 08:00:58.007783979 +0800
+++ b/drbd/drbd_req.c 2022-07-08 08:09:29.157733345 +0800
@@ -1543,7 +1543,8 @@ drbd_request_prepare(struct drbd_device
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(device->ldev->backing_bdev, bio,
+ GFP_NOIO, &drbd_io_bio_set);
req->private_bio->bi_private = req;
req->private_bio->bi_end_io = drbd_request_endio;
}