drbd/bsc-1192929_04-pass_gend_to_blk_queue_update_readahead.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

45 lines
2.3 KiB
Diff

/* {"version":"v5.15-rc1~161", "commit": ""471aa704db4904f7af5a50019ca3b5b018c0cf62, "comment": "block: pass a gendisk to blk_queue_update_readahead"} */
diff -Naur drbd-9.0.30~1+git.8e9c0812.orig/drbd/drbd-kernel-compat/gen_patch_names.c drbd-9.0.30~1+git.8e9c0812/drbd/drbd-kernel-compat/gen_patch_names.c
--- drbd-9.0.30~1+git.8e9c0812.orig/drbd/drbd-kernel-compat/gen_patch_names.c 2021-11-19 12:56:56.962529304 +0800
+++ drbd-9.0.30~1+git.8e9c0812/drbd/drbd-kernel-compat/gen_patch_names.c 2021-11-19 12:58:45.370112678 +0800
@@ -391,8 +391,10 @@
patch(1, "wb_congested_enum", true, false,
COMPAT_HAVE_WB_CONGESTED_ENUM, "present");
+#ifndef COMPAT_HAVE_DISK_UPDATE_READAHEAD
patch(1, "blk_queue_update_readahead", true, false,
COMPAT_HAVE_BLK_QUEUE_UPDATE_READAHEAD, "present");
+#endif
patch(1, "backing_dev_info", true, false,
COMPAT_HAVE_POINTER_BACKING_DEV_INFO, "is_pointer");
diff -Naur drbd-9.0.30~1+git.8e9c0812.orig/drbd/drbd-kernel-compat/tests/have_disk_update_readahead.c drbd-9.0.30~1+git.8e9c0812/drbd/drbd-kernel-compat/tests/have_disk_update_readahead.c
--- drbd-9.0.30~1+git.8e9c0812.orig/drbd/drbd-kernel-compat/tests/have_disk_update_readahead.c 1970-01-01 08:00:00.000000000 +0800
+++ drbd-9.0.30~1+git.8e9c0812/drbd/drbd-kernel-compat/tests/have_disk_update_readahead.c 2021-11-19 12:59:10.194017276 +0800
@@ -0,0 +1,9 @@
+/* { "version": "v5.16", "commit": "471aa704db4904f7af5a50019ca3b5b018c0cf62", "comment": "block: pass a gendisk to blk_queue_update_readahead", "author": "Christoph Hellwig <hch@lst.de>", "date": "Mon Aug 9 16:17:41 2021 +0200" } */
+
+#include <linux/genhd.h>
+#include <linux/blkdev.h>
+
+void foo(struct gendisk *d)
+{
+ disk_update_readahead(d);
+}
diff -Naur drbd-9.0.30~1+git.8e9c0812.orig/drbd/drbd_nl.c drbd-9.0.30~1+git.8e9c0812/drbd/drbd_nl.c
--- drbd-9.0.30~1+git.8e9c0812.orig/drbd/drbd_nl.c 2021-11-19 12:56:56.966529288 +0800
+++ drbd-9.0.30~1+git.8e9c0812/drbd/drbd_nl.c 2021-11-19 13:00:37.777680684 +0800
@@ -2124,7 +2124,11 @@
if (b) {
blk_stack_limits(&q->limits, &b->limits, 0);
+#ifdef COMPAT_HAVE_DISK_UPDATE_READAHEAD
+ disk_update_readahead(device->vdisk);
+#else
blk_queue_update_readahead(q);
+#endif
}
fixup_discard_if_not_supported(q);
fixup_write_zeroes(device, q);