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
103 lines
5.3 KiB
Diff
103 lines
5.3 KiB
Diff
/* this patch is related with following upstream kernel commit */
|
|
|
|
commit 322cbb50de711814c42fb088f6d31901502c711a
|
|
Author: Christoph Hellwig <hch@lst.de>
|
|
Date: Mon Jan 24 10:39:13 2022 +0100
|
|
|
|
block: remove genhd.h
|
|
|
|
There is no good reason to keep genhd.h separate from the main blkdev.h
|
|
header that includes it. So fold the contents of genhd.h into blkdev.h
|
|
and remove genhd.h entirely.
|
|
|
|
Signed-off-by: Christoph Hellwig <hch@lst.de>
|
|
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
|
|
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
|
|
Link: https://lore.kernel.org/r/20220124093913.742411-4-hch@lst.de
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
---
|
|
|
|
diff -Nupr a/drbd/drbd-kernel-compat/tests/have_atomic_in_flight.c b/drbd/drbd-kernel-compat/tests/have_atomic_in_flight.c
|
|
--- a/drbd/drbd-kernel-compat/tests/have_atomic_in_flight.c 2022-07-07 16:50:27.736823224 +0800
|
|
+++ b/drbd/drbd-kernel-compat/tests/have_atomic_in_flight.c 2022-07-08 18:27:01.362626866 +0800
|
|
@@ -1,6 +1,6 @@
|
|
#include <linux/version.h>
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)
|
|
-#include <linux/genhd.h>
|
|
+#include <linux/blkdev.h>
|
|
|
|
#ifndef __same_type
|
|
# define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
|
|
diff -Nupr a/drbd/drbd-kernel-compat/tests/have_bd_unlink_disk_holder.c b/drbd/drbd-kernel-compat/tests/have_bd_unlink_disk_holder.c
|
|
--- a/drbd/drbd-kernel-compat/tests/have_bd_unlink_disk_holder.c 2022-07-07 16:50:35.476788526 +0800
|
|
+++ b/drbd/drbd-kernel-compat/tests/have_bd_unlink_disk_holder.c 2022-07-07 16:52:09.432367225 +0800
|
|
@@ -1,4 +1,3 @@
|
|
-#include <linux/genhd.h>
|
|
#include <linux/fs.h>
|
|
#include <linux/blkdev.h>
|
|
|
|
diff -Nupr a/drbd/drbd-kernel-compat/tests/have_blk_alloc_disk.c b/drbd/drbd-kernel-compat/tests/have_blk_alloc_disk.c
|
|
--- a/drbd/drbd-kernel-compat/tests/have_blk_alloc_disk.c 2022-07-07 16:50:42.400757477 +0800
|
|
+++ b/drbd/drbd-kernel-compat/tests/have_blk_alloc_disk.c 2022-07-08 18:27:51.914415515 +0800
|
|
@@ -1,6 +1,6 @@
|
|
/* { "version": "v5.13-rc4", "commit": "b647ad024841d02d67e78716f51f355d8d3e9656", "comment": "5.13 introduces a blk_alloc_disk helper", "author": "Christoph Hellwig <hch@lst.de>", "date": "Fri May 21 07:50:57 2021 +0200" } */
|
|
|
|
-#include <linux/genhd.h>
|
|
+#include <linux/blkdev.h>
|
|
|
|
struct gendisk *foo(int node)
|
|
{
|
|
diff -Nupr a/drbd/drbd-kernel-compat/tests/have_disk_update_readahead.c b/drbd/drbd-kernel-compat/tests/have_disk_update_readahead.c
|
|
--- a/drbd/drbd-kernel-compat/tests/have_disk_update_readahead.c 2022-07-08 20:00:47.590378757 +0800
|
|
+++ b/drbd/drbd-kernel-compat/tests/have_disk_update_readahead.c 2022-07-08 20:01:47.462126256 +0800
|
|
@@ -1,6 +1,5 @@
|
|
/* { "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)
|
|
diff -Nupr a/drbd/drbd-kernel-compat/tests/have_hd_struct.c b/drbd/drbd-kernel-compat/tests/have_hd_struct.c
|
|
--- a/drbd/drbd-kernel-compat/tests/have_hd_struct.c 2022-07-07 16:51:01.344672526 +0800
|
|
+++ b/drbd/drbd-kernel-compat/tests/have_hd_struct.c 2022-07-08 18:31:19.633543494 +0800
|
|
@@ -1,5 +1,6 @@
|
|
/* { "version": "v5.10-rc5", "commit": "0d02129e76edf91cf04fabf1efbc3a9a1f1d729a", "comment": "struct hd_struct was merged into struct block_device", "author": "Christoph Hellwig <hch@lst.de>", "date": "Fri Nov 27 16:43:51 2020 +0100" } */
|
|
|
|
#include <linux/genhd.h>
|
|
+#include <linux/blkdev.h>
|
|
|
|
struct hd_struct hd;
|
|
diff -Nupr a/drbd/drbd-kernel-compat/tests/have_revalidate_disk_size.c b/drbd/drbd-kernel-compat/tests/have_revalidate_disk_size.c
|
|
--- a/drbd/drbd-kernel-compat/tests/have_revalidate_disk_size.c 2022-07-07 16:51:06.892647651 +0800
|
|
+++ b/drbd/drbd-kernel-compat/tests/have_revalidate_disk_size.c 2022-07-08 18:28:55.114151284 +0800
|
|
@@ -1,6 +1,6 @@
|
|
/* { "version": "v5.9-rc4", "commit": "659e56ba864d37b7ee0a49cd432205b2a5ca815e", "comment": "The revalidate_disk_size helper was added in v5.9-rc4", "author": "Christoph Hellwig <hch@lst.de>", "date": "Tue Sep 1 17:57:43 2020 +0200" } */
|
|
|
|
-#include <linux/genhd.h>
|
|
+#include <linux/blkdev.h>
|
|
|
|
void foo(struct gendisk *disk)
|
|
{
|
|
diff -Nupr a/drbd/drbd-kernel-compat/tests/have_set_capacity_and_notify.c b/drbd/drbd-kernel-compat/tests/have_set_capacity_and_notify.c
|
|
--- a/drbd/drbd-kernel-compat/tests/have_set_capacity_and_notify.c 2022-07-07 16:51:12.376623066 +0800
|
|
+++ b/drbd/drbd-kernel-compat/tests/have_set_capacity_and_notify.c 2022-07-08 18:29:26.082021496 +0800
|
|
@@ -1,6 +1,6 @@
|
|
/* { "version": "v5.10-rc5", "commit": "449f4ec9892ebc2f37a7eae6d97db2cf7c65e09a", "comment": "New (as far as DRBD is concerned) helper set_capacity_and_notify", "author": "Christoph Hellwig <hch@lst.de>", "date": "Mon Nov 16 15:56:56 2020 +0100" } */
|
|
|
|
-#include <linux/genhd.h>
|
|
+#include <linux/blkdev.h>
|
|
|
|
bool foo(struct gendisk *disk, sector_t size)
|
|
{
|
|
diff -Nupr a/drbd/drbd_int.h b/drbd/drbd_int.h
|
|
--- a/drbd/drbd_int.h 2022-07-07 16:50:13.032889154 +0800
|
|
+++ b/drbd/drbd_int.h 2022-07-07 16:51:38.292506862 +0800
|
|
@@ -28,7 +28,6 @@
|
|
#include <linux/major.h>
|
|
#include <linux/blkdev.h>
|
|
#include <linux/backing-dev.h>
|
|
-#include <linux/genhd.h>
|
|
#include <linux/idr.h>
|
|
#include <linux/lru_cache.h>
|
|
#include <linux/prefetch.h>
|