summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--5.10.1-reverts.patch84
-rw-r--r--kernel.spec2
2 files changed, 86 insertions, 0 deletions
diff --git a/5.10.1-reverts.patch b/5.10.1-reverts.patch
new file mode 100644
index 000000000..9527492ec
--- /dev/null
+++ b/5.10.1-reverts.patch
@@ -0,0 +1,84 @@
+From 76f58e00133501dff1bd0c0f05d786e8fb01fcc8 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Mon, 14 Dec 2020 17:48:11 +0100
+Subject: Revert "md: change mddev 'chunk_sectors' from int to unsigned"
+
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+This reverts commit 6ffeb1c3f8226244c08105bcdbeecc04bad6b89a.
+
+It causes problems :(
+
+Reported-by: Dave Jones <davej@codemonkey.org.uk>
+Reported-by: Mike Snitzer <snitzer@redhat.com>
+Cc: Song Liu <songliubraving@fb.com>
+Cc: Jens Axboe <axboe@kernel.dk>
+Cc: Linus Torvalds <torvalds@linux-foundation.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/md/md.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/md/md.h
++++ b/drivers/md/md.h
+@@ -311,7 +311,7 @@ struct mddev {
+ int external; /* metadata is
+ * managed externally */
+ char metadata_type[17]; /* externally set*/
+- unsigned int chunk_sectors;
++ int chunk_sectors;
+ time64_t ctime, utime;
+ int level, layout;
+ char clevel[16];
+@@ -339,7 +339,7 @@ struct mddev {
+ */
+ sector_t reshape_position;
+ int delta_disks, new_level, new_layout;
+- unsigned int new_chunk_sectors;
++ int new_chunk_sectors;
+ int reshape_backwards;
+
+ struct md_thread *thread; /* management thread */
+From ee1b46545ebbe1572ddddf70f4abe04070669bd0 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Mon, 14 Dec 2020 17:51:18 +0100
+Subject: Revert "dm raid: fix discard limits for raid1 and raid10"
+
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+This reverts commit e0910c8e4f87bb9f767e61a778b0d9271c4dc512.
+
+It causes problems :(
+
+Reported-by: Dave Jones <davej@codemonkey.org.uk>
+Reported-by: Mike Snitzer <snitzer@redhat.com>
+Cc: Zdenek Kabelac <zkabelac@redhat.com>
+Cc: Mikulas Patocka <mpatocka@redhat.com>
+Cc: Linus Torvalds <torvalds@linux-foundation.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/md/dm-raid.c | 12 +++++-------
+ 1 file changed, 5 insertions(+), 7 deletions(-)
+
+--- a/drivers/md/dm-raid.c
++++ b/drivers/md/dm-raid.c
+@@ -3730,14 +3730,12 @@ static void raid_io_hints(struct dm_targ
+ blk_limits_io_opt(limits, chunk_size_bytes * mddev_data_stripes(rs));
+
+ /*
+- * RAID10 personality requires bio splitting,
+- * RAID0/1/4/5/6 don't and process large discard bios properly.
++ * RAID1 and RAID10 personalities require bio splitting,
++ * RAID0/4/5/6 don't and process large discard bios properly.
+ */
+- if (rs_is_raid10(rs)) {
+- limits->discard_granularity = max(chunk_size_bytes,
+- limits->discard_granularity);
+- limits->max_discard_sectors = min_not_zero(rs->md.chunk_sectors,
+- limits->max_discard_sectors);
++ if (rs_is_raid1(rs) || rs_is_raid10(rs)) {
++ limits->discard_granularity = chunk_size_bytes;
++ limits->max_discard_sectors = rs->md.chunk_sectors;
+ }
+ }
+
diff --git a/kernel.spec b/kernel.spec
index 03d2abec6..5312846ba 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -740,6 +740,7 @@ Source4000: README.rst
%if !%{nopatches}
Patch1: patch-%{rpmversion}-redhat.patch
+Patch2: 5.10.1-reverts.patch
%endif
# empty final patch to facilitate testing of kernel patches
@@ -1243,6 +1244,7 @@ cp -a %{SOURCE1} .
%if !%{nopatches}
ApplyOptionalPatch patch-%{rpmversion}-redhat.patch
+ApplyOptionalPatch 5.10.1-reverts.patch
%endif
ApplyOptionalPatch linux-kernel-test.patch