SHA256
1
0
forked from pool/drbd
drbd/bsc-1201335_03-genhd.patch

103 lines
5.3 KiB
Diff
Raw Normal View History

/* 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>