]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Dec 2020 16:54:54 +0000 (17:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Dec 2020 16:54:54 +0000 (17:54 +0100)
added patches:
revert-dm-raid-fix-discard-limits-for-raid1-and-raid10.patch
revert-md-change-mddev-chunk_sectors-from-int-to.patch

queue-5.10/revert-dm-raid-fix-discard-limits-for-raid1-and-raid10.patch [new file with mode: 0644]
queue-5.10/revert-md-change-mddev-chunk_sectors-from-int-to.patch [new file with mode: 0644]
queue-5.10/series [new file with mode: 0644]

diff --git a/queue-5.10/revert-dm-raid-fix-discard-limits-for-raid1-and-raid10.patch b/queue-5.10/revert-dm-raid-fix-discard-limits-for-raid1-and-raid10.patch
new file mode 100644 (file)
index 0000000..1e711c9
--- /dev/null
@@ -0,0 +1,41 @@
+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: [PATCH 2/2] Revert "dm raid: fix discard limits for raid1 and raid10"
+
+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/queue-5.10/revert-md-change-mddev-chunk_sectors-from-int-to.patch b/queue-5.10/revert-md-change-mddev-chunk_sectors-from-int-to.patch
new file mode 100644 (file)
index 0000000..c1f59d0
--- /dev/null
@@ -0,0 +1,40 @@
+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: [PATCH 1/2] Revert "md: change mddev 'chunk_sectors' from int to
+ unsigned"
+
+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 */
diff --git a/queue-5.10/series b/queue-5.10/series
new file mode 100644 (file)
index 0000000..cee130a
--- /dev/null
@@ -0,0 +1,2 @@
+revert-md-change-mddev-chunk_sectors-from-int-to.patch
+revert-dm-raid-fix-discard-limits-for-raid1-and-raid10.patch