1eb6b25c2a
- 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
56 lines
2.3 KiB
Diff
56 lines
2.3 KiB
Diff
From 25592a4a902415cf1a353a1e26ba11b4ccc0eca7 Mon Sep 17 00:00:00 2001
|
|
From: <christoph.boehmwalder@linbit.com>
|
|
Date: Wed, 6 Apr 2022 12:27:36 +0200
|
|
Subject: [PATCH] compat: test and cocci patch for bdi in gendisk
|
|
|
|
---
|
|
.../cocci/struct_gendisk__no_has_backing_dev_info.cocci | 6 ++++++
|
|
drbd/drbd-kernel-compat/gen_patch_names.c | 3 +++
|
|
.../tests/struct_gendisk_has_backing_dev_info.c | 8 ++++++++
|
|
3 files changed, 17 insertions(+)
|
|
create mode 100644 drbd/drbd-kernel-compat/cocci/struct_gendisk__no_has_backing_dev_info.cocci
|
|
create mode 100644 drbd/drbd-kernel-compat/tests/struct_gendisk_has_backing_dev_info.c
|
|
|
|
diff --git a/drbd/drbd-kernel-compat/cocci/struct_gendisk__no_has_backing_dev_info.cocci b/drbd/drbd-kernel-compat/cocci/struct_gendisk__no_has_backing_dev_info.cocci
|
|
new file mode 100644
|
|
index 000000000000..b3d290710ee8
|
|
--- /dev/null
|
|
+++ b/drbd/drbd-kernel-compat/cocci/struct_gendisk__no_has_backing_dev_info.cocci
|
|
@@ -0,0 +1,6 @@
|
|
+@@
|
|
+struct drbd_device *d;
|
|
+@@
|
|
+d->ldev->backing_bdev->
|
|
+- bd_disk->bdi
|
|
++ bd_disk->queue->backing_dev_info
|
|
diff -Nupr a/drbd/drbd-kernel-compat/gen_patch_names.c b/drbd/drbd-kernel-compat/gen_patch_names.c
|
|
--- a/drbd/drbd-kernel-compat/gen_patch_names.c 2022-07-08 19:43:37.106735503 +0800
|
|
+++ b/drbd/drbd-kernel-compat/gen_patch_names.c 2022-07-08 19:45:17.570310319 +0800
|
|
@@ -396,6 +396,9 @@ int main(int argc, char **argv)
|
|
COMPAT_HAVE_BLK_QUEUE_UPDATE_READAHEAD, "present");
|
|
#endif
|
|
|
|
+ patch(1, "struct_gendisk", true, false,
|
|
+ COMPAT_STRUCT_GENDISK_HAS_BACKING_DEV_INFO, "has_backing_dev_info");
|
|
+
|
|
patch(1, "backing_dev_info", true, false,
|
|
COMPAT_HAVE_POINTER_BACKING_DEV_INFO, "is_pointer");
|
|
|
|
diff --git a/drbd/drbd-kernel-compat/tests/struct_gendisk_has_backing_dev_info.c b/drbd/drbd-kernel-compat/tests/struct_gendisk_has_backing_dev_info.c
|
|
new file mode 100644
|
|
index 000000000000..cd40214a564c
|
|
--- /dev/null
|
|
+++ b/drbd/drbd-kernel-compat/tests/struct_gendisk_has_backing_dev_info.c
|
|
@@ -0,0 +1,8 @@
|
|
+/* { "version": "v5.15-rc1", "commit": "21cf866145047f8bfecb38ec8d2fed64464c074f", "comment": "The backing_dev_info was moved from request_queue to backing_dev_info", "author": "Christoph Hellwig <hch@lst.de>", "date": "Wed Jul 1 11:06:22 2020 +0200" } */
|
|
+
|
|
+#include <linux/blkdev.h>
|
|
+
|
|
+struct backing_dev_info *foo(struct gendisk *d)
|
|
+{
|
|
+ return d->bdi;
|
|
+}
|
|
--
|
|
2.34.1
|
|
|