]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop some raid1 patches from everywhere
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Sep 2023 12:16:56 +0000 (14:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Sep 2023 12:16:56 +0000 (14:16 +0200)
23 files changed:
queue-4.14/md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch [deleted file]
queue-4.14/series
queue-4.19/md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch [deleted file]
queue-4.19/md-raid1-hold-the-barrier-until-handle_read_error-fi.patch [deleted file]
queue-4.19/series
queue-5.10/md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch [deleted file]
queue-5.10/md-raid1-hold-the-barrier-until-handle_read_error-fi.patch [deleted file]
queue-5.10/series
queue-5.15/md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch [deleted file]
queue-5.15/md-raid1-hold-the-barrier-until-handle_read_error-fi.patch [deleted file]
queue-5.15/series
queue-5.4/md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch [deleted file]
queue-5.4/md-raid1-hold-the-barrier-until-handle_read_error-fi.patch [deleted file]
queue-5.4/series
queue-6.1/md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch [deleted file]
queue-6.1/md-raid1-hold-the-barrier-until-handle_read_error-fi.patch [deleted file]
queue-6.1/series
queue-6.4/md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch [deleted file]
queue-6.4/md-raid1-hold-the-barrier-until-handle_read_error-fi.patch [deleted file]
queue-6.4/series
queue-6.5/md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch [deleted file]
queue-6.5/md-raid1-hold-the-barrier-until-handle_read_error-fi.patch [deleted file]
queue-6.5/series

diff --git a/queue-4.14/md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch b/queue-4.14/md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch
deleted file mode 100644 (file)
index 0636384..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-From 3295e1b663214ada8d84fed6ff028ec8e723ca99 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 14 Aug 2023 21:53:55 +0800
-Subject: md/raid1: free the r1bio before waiting for blocked rdev
-
-From: Xueshi Hu <xueshi.hu@smartx.com>
-
-[ Upstream commit 992db13a4aee766c8bfbf046ad15c2db5fa7cab8 ]
-
-Raid1 reshape will change mempool and r1conf::raid_disks which are
-needed to free r1bio. allow_barrier() make a concurrent raid1_reshape()
-possible. So, free the in-flight r1bio before waiting blocked rdev.
-
-Fixes: 6bfe0b499082 ("md: support blocking writes to an array on device failure")
-Reviewed-by: Yu Kuai <yukuai3@huawei.com>
-Signed-off-by: Xueshi Hu <xueshi.hu@smartx.com>
-Link: https://lore.kernel.org/r/20230814135356.1113639-3-xueshi.hu@smartx.com
-Signed-off-by: Song Liu <song@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/md/raid1.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
-index 28f78199de3ba..09350e7eab8de 100644
---- a/drivers/md/raid1.c
-+++ b/drivers/md/raid1.c
-@@ -1329,6 +1329,7 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
-       }
-       wait_barrier(conf, bio->bi_iter.bi_sector);
-+ retry_write:
-       r1_bio = alloc_r1bio(mddev, bio);
-       r1_bio->sectors = max_write_sectors;
-@@ -1350,7 +1351,6 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
-        */
-       disks = conf->raid_disks * 2;
-- retry_write:
-       blocked_rdev = NULL;
-       rcu_read_lock();
-       max_sectors = r1_bio->sectors;
-@@ -1421,7 +1421,7 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
-               for (j = 0; j < i; j++)
-                       if (r1_bio->bios[j])
-                               rdev_dec_pending(conf->mirrors[j].rdev, mddev);
--              r1_bio->state = 0;
-+              free_r1bio(r1_bio);
-               allow_barrier(conf, bio->bi_iter.bi_sector);
-               raid1_log(mddev, "wait rdev %d blocked", blocked_rdev->raid_disk);
-               md_wait_for_blocked_rdev(blocked_rdev, mddev);
--- 
-2.40.1
-
index 58460b45b8c892a6db25bd67fc950fabaabcf614..5d0ee567f75617c5a242c8d554afb596e16a104b 100644 (file)
@@ -59,7 +59,6 @@ drm-adv7511-fix-low-refresh-rate-register-for-adv753.patch
 of-unittest-fix-null-pointer-dereferencing-in-of_uni.patch
 smackfs-prevent-underflow-in-smk_set_cipso.patch
 audit-fix-possible-soft-lockup-in-__audit_inode_chil.patch
-md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch
 alsa-ac97-fix-possible-error-value-of-rac97.patch
 drivers-clk-keystone-fix-parameter-judgment-in-_of_p.patch
 clk-sunxi-ng-modify-mismatched-function-name.patch
diff --git a/queue-4.19/md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch b/queue-4.19/md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch
deleted file mode 100644 (file)
index acfcd4c..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-From a3ad07d093466d55c5c7bb1a91a8500838bd0cc5 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 14 Aug 2023 21:53:55 +0800
-Subject: md/raid1: free the r1bio before waiting for blocked rdev
-
-From: Xueshi Hu <xueshi.hu@smartx.com>
-
-[ Upstream commit 992db13a4aee766c8bfbf046ad15c2db5fa7cab8 ]
-
-Raid1 reshape will change mempool and r1conf::raid_disks which are
-needed to free r1bio. allow_barrier() make a concurrent raid1_reshape()
-possible. So, free the in-flight r1bio before waiting blocked rdev.
-
-Fixes: 6bfe0b499082 ("md: support blocking writes to an array on device failure")
-Reviewed-by: Yu Kuai <yukuai3@huawei.com>
-Signed-off-by: Xueshi Hu <xueshi.hu@smartx.com>
-Link: https://lore.kernel.org/r/20230814135356.1113639-3-xueshi.hu@smartx.com
-Signed-off-by: Song Liu <song@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/md/raid1.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
-index 0f8b1fb3d0517..530a53aafc122 100644
---- a/drivers/md/raid1.c
-+++ b/drivers/md/raid1.c
-@@ -1341,6 +1341,7 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
-        */
-       wait_barrier(conf, bio->bi_iter.bi_sector);
-+ retry_write:
-       r1_bio = alloc_r1bio(mddev, bio);
-       r1_bio->sectors = max_write_sectors;
-@@ -1362,7 +1363,6 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
-        */
-       disks = conf->raid_disks * 2;
-- retry_write:
-       blocked_rdev = NULL;
-       rcu_read_lock();
-       max_sectors = r1_bio->sectors;
-@@ -1433,7 +1433,7 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
-               for (j = 0; j < i; j++)
-                       if (r1_bio->bios[j])
-                               rdev_dec_pending(conf->mirrors[j].rdev, mddev);
--              r1_bio->state = 0;
-+              free_r1bio(r1_bio);
-               allow_barrier(conf, bio->bi_iter.bi_sector);
-               raid1_log(mddev, "wait rdev %d blocked", blocked_rdev->raid_disk);
-               md_wait_for_blocked_rdev(blocked_rdev, mddev);
--- 
-2.40.1
-
diff --git a/queue-4.19/md-raid1-hold-the-barrier-until-handle_read_error-fi.patch b/queue-4.19/md-raid1-hold-the-barrier-until-handle_read_error-fi.patch
deleted file mode 100644 (file)
index 31dbec4..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-From b0bc88c25eec302a0b2dcf91ec53f3b37b4af637 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 14 Aug 2023 21:53:56 +0800
-Subject: md/raid1: hold the barrier until handle_read_error() finishes
-
-From: Xueshi Hu <xueshi.hu@smartx.com>
-
-[ Upstream commit c069da449a13669ffa754fd971747e7e17e7d691 ]
-
-handle_read_error() will call allow_barrier() to match the former barrier
-raising. However, it should put the allow_barrier() at the end to avoid a
-concurrent raid reshape.
-
-Fixes: 689389a06ce7 ("md/raid1: simplify handle_read_error().")
-Reviewed-by: Yu Kuai <yukuai3@huawei.com>
-Signed-off-by: Xueshi Hu <xueshi.hu@smartx.com>
-Link: https://lore.kernel.org/r/20230814135356.1113639-4-xueshi.hu@smartx.com
-Signed-off-by: Song Liu <song@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/md/raid1.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
-index 530a53aafc122..2bb0f8be7e870 100644
---- a/drivers/md/raid1.c
-+++ b/drivers/md/raid1.c
-@@ -2458,6 +2458,7 @@ static void handle_read_error(struct r1conf *conf, struct r1bio *r1_bio)
-       struct mddev *mddev = conf->mddev;
-       struct bio *bio;
-       struct md_rdev *rdev;
-+      sector_t sector;
-       clear_bit(R1BIO_ReadError, &r1_bio->state);
-       /* we got a read error. Maybe the drive is bad.  Maybe just
-@@ -2487,12 +2488,13 @@ static void handle_read_error(struct r1conf *conf, struct r1bio *r1_bio)
-       }
-       rdev_dec_pending(rdev, conf->mddev);
--      allow_barrier(conf, r1_bio->sector);
-+      sector = r1_bio->sector;
-       bio = r1_bio->master_bio;
-       /* Reuse the old r1_bio so that the IO_BLOCKED settings are preserved */
-       r1_bio->state = 0;
-       raid1_read_request(mddev, bio, r1_bio->sectors, r1_bio);
-+      allow_barrier(conf, sector);
- }
- static void raid1d(struct md_thread *thread)
--- 
-2.40.1
-
index a6cad1c47595f5b29d8daf875e3ef270912685f2..546879bc9a311ff381a37acb42fc24e8918289f5 100644 (file)
@@ -99,8 +99,6 @@ drm-msm-replace-drm_framebuffer_-un-reference-with-p.patch
 drm-msm-mdp5-don-t-leak-some-plane-state.patch
 smackfs-prevent-underflow-in-smk_set_cipso.patch
 audit-fix-possible-soft-lockup-in-__audit_inode_chil.patch
-md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch
-md-raid1-hold-the-barrier-until-handle_read_error-fi.patch
 of-unittest-fix-overlay-type-in-apply-revert-check.patch
 alsa-ac97-fix-possible-error-value-of-rac97.patch
 drivers-clk-keystone-fix-parameter-judgment-in-_of_p.patch
diff --git a/queue-5.10/md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch b/queue-5.10/md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch
deleted file mode 100644 (file)
index 3931f3e..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-From b76e91380c3bef29f4b3cf2a34717ffbb169cd6a Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 14 Aug 2023 21:53:55 +0800
-Subject: md/raid1: free the r1bio before waiting for blocked rdev
-
-From: Xueshi Hu <xueshi.hu@smartx.com>
-
-[ Upstream commit 992db13a4aee766c8bfbf046ad15c2db5fa7cab8 ]
-
-Raid1 reshape will change mempool and r1conf::raid_disks which are
-needed to free r1bio. allow_barrier() make a concurrent raid1_reshape()
-possible. So, free the in-flight r1bio before waiting blocked rdev.
-
-Fixes: 6bfe0b499082 ("md: support blocking writes to an array on device failure")
-Reviewed-by: Yu Kuai <yukuai3@huawei.com>
-Signed-off-by: Xueshi Hu <xueshi.hu@smartx.com>
-Link: https://lore.kernel.org/r/20230814135356.1113639-3-xueshi.hu@smartx.com
-Signed-off-by: Song Liu <song@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/md/raid1.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
-index 6b5cc3f59fb39..84499c1385d11 100644
---- a/drivers/md/raid1.c
-+++ b/drivers/md/raid1.c
-@@ -1349,6 +1349,7 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
-        */
-       wait_barrier(conf, bio->bi_iter.bi_sector);
-+ retry_write:
-       r1_bio = alloc_r1bio(mddev, bio);
-       r1_bio->sectors = max_write_sectors;
-@@ -1370,7 +1371,6 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
-        */
-       disks = conf->raid_disks * 2;
-- retry_write:
-       blocked_rdev = NULL;
-       rcu_read_lock();
-       max_sectors = r1_bio->sectors;
-@@ -1441,7 +1441,7 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
-               for (j = 0; j < i; j++)
-                       if (r1_bio->bios[j])
-                               rdev_dec_pending(conf->mirrors[j].rdev, mddev);
--              r1_bio->state = 0;
-+              free_r1bio(r1_bio);
-               allow_barrier(conf, bio->bi_iter.bi_sector);
-               raid1_log(mddev, "wait rdev %d blocked", blocked_rdev->raid_disk);
-               md_wait_for_blocked_rdev(blocked_rdev, mddev);
--- 
-2.40.1
-
diff --git a/queue-5.10/md-raid1-hold-the-barrier-until-handle_read_error-fi.patch b/queue-5.10/md-raid1-hold-the-barrier-until-handle_read_error-fi.patch
deleted file mode 100644 (file)
index 8998e7b..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-From d5d3a37b342c80aa27183df78baa30a04b82e549 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 14 Aug 2023 21:53:56 +0800
-Subject: md/raid1: hold the barrier until handle_read_error() finishes
-
-From: Xueshi Hu <xueshi.hu@smartx.com>
-
-[ Upstream commit c069da449a13669ffa754fd971747e7e17e7d691 ]
-
-handle_read_error() will call allow_barrier() to match the former barrier
-raising. However, it should put the allow_barrier() at the end to avoid a
-concurrent raid reshape.
-
-Fixes: 689389a06ce7 ("md/raid1: simplify handle_read_error().")
-Reviewed-by: Yu Kuai <yukuai3@huawei.com>
-Signed-off-by: Xueshi Hu <xueshi.hu@smartx.com>
-Link: https://lore.kernel.org/r/20230814135356.1113639-4-xueshi.hu@smartx.com
-Signed-off-by: Song Liu <song@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/md/raid1.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
-index 84499c1385d11..021155617c803 100644
---- a/drivers/md/raid1.c
-+++ b/drivers/md/raid1.c
-@@ -2464,6 +2464,7 @@ static void handle_read_error(struct r1conf *conf, struct r1bio *r1_bio)
-       struct mddev *mddev = conf->mddev;
-       struct bio *bio;
-       struct md_rdev *rdev;
-+      sector_t sector;
-       clear_bit(R1BIO_ReadError, &r1_bio->state);
-       /* we got a read error. Maybe the drive is bad.  Maybe just
-@@ -2493,12 +2494,13 @@ static void handle_read_error(struct r1conf *conf, struct r1bio *r1_bio)
-       }
-       rdev_dec_pending(rdev, conf->mddev);
--      allow_barrier(conf, r1_bio->sector);
-+      sector = r1_bio->sector;
-       bio = r1_bio->master_bio;
-       /* Reuse the old r1_bio so that the IO_BLOCKED settings are preserved */
-       r1_bio->state = 0;
-       raid1_read_request(mddev, bio, r1_bio->sectors, r1_bio);
-+      allow_barrier(conf, sector);
- }
- static void raid1d(struct md_thread *thread)
--- 
-2.40.1
-
index 21dbd397ae8db1444999c46938a680d49bdf7c4e..dfd676dd26b589497c6aa262c7c83e08bf533c5d 100644 (file)
@@ -164,8 +164,6 @@ audit-fix-possible-soft-lockup-in-__audit_inode_chil.patch
 bus-ti-sysc-fix-build-warning-for-64-bit-build.patch
 drm-mediatek-fix-potential-memory-leak-if-vmap-fail.patch
 bus-ti-sysc-fix-cast-to-enum-warning.patch
-md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch
-md-raid1-hold-the-barrier-until-handle_read_error-fi.patch
 of-unittest-fix-overlay-type-in-apply-revert-check.patch
 alsa-ac97-fix-possible-error-value-of-rac97.patch
 ipmi-ssif-add-check-for-kstrdup.patch
diff --git a/queue-5.15/md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch b/queue-5.15/md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch
deleted file mode 100644 (file)
index b5a1e38..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-From 42c298d231b7d90a22c68a91c9536637e5cbf618 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 14 Aug 2023 21:53:55 +0800
-Subject: md/raid1: free the r1bio before waiting for blocked rdev
-
-From: Xueshi Hu <xueshi.hu@smartx.com>
-
-[ Upstream commit 992db13a4aee766c8bfbf046ad15c2db5fa7cab8 ]
-
-Raid1 reshape will change mempool and r1conf::raid_disks which are
-needed to free r1bio. allow_barrier() make a concurrent raid1_reshape()
-possible. So, free the in-flight r1bio before waiting blocked rdev.
-
-Fixes: 6bfe0b499082 ("md: support blocking writes to an array on device failure")
-Reviewed-by: Yu Kuai <yukuai3@huawei.com>
-Signed-off-by: Xueshi Hu <xueshi.hu@smartx.com>
-Link: https://lore.kernel.org/r/20230814135356.1113639-3-xueshi.hu@smartx.com
-Signed-off-by: Song Liu <song@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/md/raid1.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
-index 47997a9a3ca18..0e5fd8a524a1d 100644
---- a/drivers/md/raid1.c
-+++ b/drivers/md/raid1.c
-@@ -1355,6 +1355,7 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
-        */
-       wait_barrier(conf, bio->bi_iter.bi_sector);
-+ retry_write:
-       r1_bio = alloc_r1bio(mddev, bio);
-       r1_bio->sectors = max_write_sectors;
-@@ -1370,7 +1371,6 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
-        */
-       disks = conf->raid_disks * 2;
-- retry_write:
-       blocked_rdev = NULL;
-       rcu_read_lock();
-       max_sectors = r1_bio->sectors;
-@@ -1450,7 +1450,7 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
-               for (j = 0; j < i; j++)
-                       if (r1_bio->bios[j])
-                               rdev_dec_pending(conf->mirrors[j].rdev, mddev);
--              r1_bio->state = 0;
-+              free_r1bio(r1_bio);
-               allow_barrier(conf, bio->bi_iter.bi_sector);
-               raid1_log(mddev, "wait rdev %d blocked", blocked_rdev->raid_disk);
-               md_wait_for_blocked_rdev(blocked_rdev, mddev);
--- 
-2.40.1
-
diff --git a/queue-5.15/md-raid1-hold-the-barrier-until-handle_read_error-fi.patch b/queue-5.15/md-raid1-hold-the-barrier-until-handle_read_error-fi.patch
deleted file mode 100644 (file)
index c5dfc68..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-From 215d4c4f74d212ddcc146e9d26c4f1776f460637 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 14 Aug 2023 21:53:56 +0800
-Subject: md/raid1: hold the barrier until handle_read_error() finishes
-
-From: Xueshi Hu <xueshi.hu@smartx.com>
-
-[ Upstream commit c069da449a13669ffa754fd971747e7e17e7d691 ]
-
-handle_read_error() will call allow_barrier() to match the former barrier
-raising. However, it should put the allow_barrier() at the end to avoid a
-concurrent raid reshape.
-
-Fixes: 689389a06ce7 ("md/raid1: simplify handle_read_error().")
-Reviewed-by: Yu Kuai <yukuai3@huawei.com>
-Signed-off-by: Xueshi Hu <xueshi.hu@smartx.com>
-Link: https://lore.kernel.org/r/20230814135356.1113639-4-xueshi.hu@smartx.com
-Signed-off-by: Song Liu <song@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/md/raid1.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
-index 0e5fd8a524a1d..e8e475b082567 100644
---- a/drivers/md/raid1.c
-+++ b/drivers/md/raid1.c
-@@ -2484,6 +2484,7 @@ static void handle_read_error(struct r1conf *conf, struct r1bio *r1_bio)
-       struct mddev *mddev = conf->mddev;
-       struct bio *bio;
-       struct md_rdev *rdev;
-+      sector_t sector;
-       clear_bit(R1BIO_ReadError, &r1_bio->state);
-       /* we got a read error. Maybe the drive is bad.  Maybe just
-@@ -2513,12 +2514,13 @@ static void handle_read_error(struct r1conf *conf, struct r1bio *r1_bio)
-       }
-       rdev_dec_pending(rdev, conf->mddev);
--      allow_barrier(conf, r1_bio->sector);
-+      sector = r1_bio->sector;
-       bio = r1_bio->master_bio;
-       /* Reuse the old r1_bio so that the IO_BLOCKED settings are preserved */
-       r1_bio->state = 0;
-       raid1_read_request(mddev, bio, r1_bio->sectors, r1_bio);
-+      allow_barrier(conf, sector);
- }
- static void raid1d(struct md_thread *thread)
--- 
-2.40.1
-
index 58f088f1fbe0d1d011d02a148bcf3ca741ffda40..62d454f76987c551bc9e2a4a51f7921384390b8d 100644 (file)
@@ -182,8 +182,6 @@ drm-mediatek-remove-freeing-not-dynamic-allocated-me.patch
 drm-mediatek-fix-potential-memory-leak-if-vmap-fail.patch
 arm64-dts-qcom-apq8016-sbc-fix-ov5640-regulator-supp.patch
 bus-ti-sysc-fix-cast-to-enum-warning.patch
-md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch
-md-raid1-hold-the-barrier-until-handle_read_error-fi.patch
 md-set-md_broken-for-raid1-and-raid10.patch
 md-add-error_handlers-for-raid0-and-linear.patch
 md-raid0-factor-out-helper-for-mapping-and-submittin.patch
diff --git a/queue-5.4/md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch b/queue-5.4/md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch
deleted file mode 100644 (file)
index 7139c60..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-From 2a0f2c067e6ab45f70a8286afeb51dad7d68ae15 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 14 Aug 2023 21:53:55 +0800
-Subject: md/raid1: free the r1bio before waiting for blocked rdev
-
-From: Xueshi Hu <xueshi.hu@smartx.com>
-
-[ Upstream commit 992db13a4aee766c8bfbf046ad15c2db5fa7cab8 ]
-
-Raid1 reshape will change mempool and r1conf::raid_disks which are
-needed to free r1bio. allow_barrier() make a concurrent raid1_reshape()
-possible. So, free the in-flight r1bio before waiting blocked rdev.
-
-Fixes: 6bfe0b499082 ("md: support blocking writes to an array on device failure")
-Reviewed-by: Yu Kuai <yukuai3@huawei.com>
-Signed-off-by: Xueshi Hu <xueshi.hu@smartx.com>
-Link: https://lore.kernel.org/r/20230814135356.1113639-3-xueshi.hu@smartx.com
-Signed-off-by: Song Liu <song@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/md/raid1.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
-index 1919de4c8c12d..c507b759491a2 100644
---- a/drivers/md/raid1.c
-+++ b/drivers/md/raid1.c
-@@ -1361,6 +1361,7 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
-        */
-       wait_barrier(conf, bio->bi_iter.bi_sector);
-+ retry_write:
-       r1_bio = alloc_r1bio(mddev, bio);
-       r1_bio->sectors = max_write_sectors;
-@@ -1382,7 +1383,6 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
-        */
-       disks = conf->raid_disks * 2;
-- retry_write:
-       blocked_rdev = NULL;
-       rcu_read_lock();
-       max_sectors = r1_bio->sectors;
-@@ -1453,7 +1453,7 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
-               for (j = 0; j < i; j++)
-                       if (r1_bio->bios[j])
-                               rdev_dec_pending(conf->mirrors[j].rdev, mddev);
--              r1_bio->state = 0;
-+              free_r1bio(r1_bio);
-               allow_barrier(conf, bio->bi_iter.bi_sector);
-               raid1_log(mddev, "wait rdev %d blocked", blocked_rdev->raid_disk);
-               md_wait_for_blocked_rdev(blocked_rdev, mddev);
--- 
-2.40.1
-
diff --git a/queue-5.4/md-raid1-hold-the-barrier-until-handle_read_error-fi.patch b/queue-5.4/md-raid1-hold-the-barrier-until-handle_read_error-fi.patch
deleted file mode 100644 (file)
index c0a2964..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-From 355b03caed8649bf582b4b555a97565bcbb424bd Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 14 Aug 2023 21:53:56 +0800
-Subject: md/raid1: hold the barrier until handle_read_error() finishes
-
-From: Xueshi Hu <xueshi.hu@smartx.com>
-
-[ Upstream commit c069da449a13669ffa754fd971747e7e17e7d691 ]
-
-handle_read_error() will call allow_barrier() to match the former barrier
-raising. However, it should put the allow_barrier() at the end to avoid a
-concurrent raid reshape.
-
-Fixes: 689389a06ce7 ("md/raid1: simplify handle_read_error().")
-Reviewed-by: Yu Kuai <yukuai3@huawei.com>
-Signed-off-by: Xueshi Hu <xueshi.hu@smartx.com>
-Link: https://lore.kernel.org/r/20230814135356.1113639-4-xueshi.hu@smartx.com
-Signed-off-by: Song Liu <song@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/md/raid1.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
-index c507b759491a2..253c620515f06 100644
---- a/drivers/md/raid1.c
-+++ b/drivers/md/raid1.c
-@@ -2481,6 +2481,7 @@ static void handle_read_error(struct r1conf *conf, struct r1bio *r1_bio)
-       struct mddev *mddev = conf->mddev;
-       struct bio *bio;
-       struct md_rdev *rdev;
-+      sector_t sector;
-       clear_bit(R1BIO_ReadError, &r1_bio->state);
-       /* we got a read error. Maybe the drive is bad.  Maybe just
-@@ -2510,12 +2511,13 @@ static void handle_read_error(struct r1conf *conf, struct r1bio *r1_bio)
-       }
-       rdev_dec_pending(rdev, conf->mddev);
--      allow_barrier(conf, r1_bio->sector);
-+      sector = r1_bio->sector;
-       bio = r1_bio->master_bio;
-       /* Reuse the old r1_bio so that the IO_BLOCKED settings are preserved */
-       r1_bio->state = 0;
-       raid1_read_request(mddev, bio, r1_bio->sectors, r1_bio);
-+      allow_barrier(conf, sector);
- }
- static void raid1d(struct md_thread *thread)
--- 
-2.40.1
-
index 52d42efa00616d6b3a22d705723860b95e365fcd..a56389282fc4f9fdfed85a24df6b96beb51352c4 100644 (file)
@@ -120,8 +120,6 @@ drm-msm-mdp5-don-t-leak-some-plane-state.patch
 smackfs-prevent-underflow-in-smk_set_cipso.patch
 audit-fix-possible-soft-lockup-in-__audit_inode_chil.patch
 drm-mediatek-fix-potential-memory-leak-if-vmap-fail.patch
-md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch
-md-raid1-hold-the-barrier-until-handle_read_error-fi.patch
 of-unittest-fix-overlay-type-in-apply-revert-check.patch
 alsa-ac97-fix-possible-error-value-of-rac97.patch
 ipmi-ssif-add-check-for-kstrdup.patch
diff --git a/queue-6.1/md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch b/queue-6.1/md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch
deleted file mode 100644 (file)
index 72b60d5..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-From 1c25c10a5eb0a12dbb9139f1085b4cdd39c4f80a Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 14 Aug 2023 21:53:55 +0800
-Subject: md/raid1: free the r1bio before waiting for blocked rdev
-
-From: Xueshi Hu <xueshi.hu@smartx.com>
-
-[ Upstream commit 992db13a4aee766c8bfbf046ad15c2db5fa7cab8 ]
-
-Raid1 reshape will change mempool and r1conf::raid_disks which are
-needed to free r1bio. allow_barrier() make a concurrent raid1_reshape()
-possible. So, free the in-flight r1bio before waiting blocked rdev.
-
-Fixes: 6bfe0b499082 ("md: support blocking writes to an array on device failure")
-Reviewed-by: Yu Kuai <yukuai3@huawei.com>
-Signed-off-by: Xueshi Hu <xueshi.hu@smartx.com>
-Link: https://lore.kernel.org/r/20230814135356.1113639-3-xueshi.hu@smartx.com
-Signed-off-by: Song Liu <song@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/md/raid1.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
-index ac64c587191b9..433db7007f88b 100644
---- a/drivers/md/raid1.c
-+++ b/drivers/md/raid1.c
-@@ -1370,6 +1370,7 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
-               return;
-       }
-+ retry_write:
-       r1_bio = alloc_r1bio(mddev, bio);
-       r1_bio->sectors = max_write_sectors;
-@@ -1385,7 +1386,6 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
-        */
-       disks = conf->raid_disks * 2;
-- retry_write:
-       blocked_rdev = NULL;
-       rcu_read_lock();
-       max_sectors = r1_bio->sectors;
-@@ -1465,7 +1465,7 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
-               for (j = 0; j < i; j++)
-                       if (r1_bio->bios[j])
-                               rdev_dec_pending(conf->mirrors[j].rdev, mddev);
--              r1_bio->state = 0;
-+              free_r1bio(r1_bio);
-               allow_barrier(conf, bio->bi_iter.bi_sector);
-               if (bio->bi_opf & REQ_NOWAIT) {
--- 
-2.40.1
-
diff --git a/queue-6.1/md-raid1-hold-the-barrier-until-handle_read_error-fi.patch b/queue-6.1/md-raid1-hold-the-barrier-until-handle_read_error-fi.patch
deleted file mode 100644 (file)
index c55863e..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-From e44ddc7acda0b43c6b76e82589d60c92547eea34 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 14 Aug 2023 21:53:56 +0800
-Subject: md/raid1: hold the barrier until handle_read_error() finishes
-
-From: Xueshi Hu <xueshi.hu@smartx.com>
-
-[ Upstream commit c069da449a13669ffa754fd971747e7e17e7d691 ]
-
-handle_read_error() will call allow_barrier() to match the former barrier
-raising. However, it should put the allow_barrier() at the end to avoid a
-concurrent raid reshape.
-
-Fixes: 689389a06ce7 ("md/raid1: simplify handle_read_error().")
-Reviewed-by: Yu Kuai <yukuai3@huawei.com>
-Signed-off-by: Xueshi Hu <xueshi.hu@smartx.com>
-Link: https://lore.kernel.org/r/20230814135356.1113639-4-xueshi.hu@smartx.com
-Signed-off-by: Song Liu <song@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/md/raid1.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
-index 433db7007f88b..2d9372e6b5961 100644
---- a/drivers/md/raid1.c
-+++ b/drivers/md/raid1.c
-@@ -2495,6 +2495,7 @@ static void handle_read_error(struct r1conf *conf, struct r1bio *r1_bio)
-       struct mddev *mddev = conf->mddev;
-       struct bio *bio;
-       struct md_rdev *rdev;
-+      sector_t sector;
-       clear_bit(R1BIO_ReadError, &r1_bio->state);
-       /* we got a read error. Maybe the drive is bad.  Maybe just
-@@ -2524,12 +2525,13 @@ static void handle_read_error(struct r1conf *conf, struct r1bio *r1_bio)
-       }
-       rdev_dec_pending(rdev, conf->mddev);
--      allow_barrier(conf, r1_bio->sector);
-+      sector = r1_bio->sector;
-       bio = r1_bio->master_bio;
-       /* Reuse the old r1_bio so that the IO_BLOCKED settings are preserved */
-       r1_bio->state = 0;
-       raid1_read_request(mddev, bio, r1_bio->sectors, r1_bio);
-+      allow_barrier(conf, sector);
- }
- static void raid1d(struct md_thread *thread)
--- 
-2.40.1
-
index cd4285c62ee31956009aaf9a86e5c26d80cd4678..15c47a9dc2bce690694793ce173d3e9148754a22 100644 (file)
@@ -307,8 +307,6 @@ bus-ti-sysc-fix-cast-to-enum-warning.patch
 md-raid5-cache-fix-a-deadlock-in-r5l_exit_log.patch
 md-raid5-cache-fix-null-ptr-deref-for-r5l_flush_stri.patch
 firmware-cs_dsp-fix-new-control-name-check.patch
-md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch
-md-raid1-hold-the-barrier-until-handle_read_error-fi.patch
 md-add-error_handlers-for-raid0-and-linear.patch
 md-raid0-factor-out-helper-for-mapping-and-submittin.patch
 md-raid0-fix-performance-regression-for-large-sequen.patch
diff --git a/queue-6.4/md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch b/queue-6.4/md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch
deleted file mode 100644 (file)
index 7d18186..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-From abb2844ee95e8e3fc8de36fe9c36b4396da094a3 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 14 Aug 2023 21:53:55 +0800
-Subject: md/raid1: free the r1bio before waiting for blocked rdev
-
-From: Xueshi Hu <xueshi.hu@smartx.com>
-
-[ Upstream commit 992db13a4aee766c8bfbf046ad15c2db5fa7cab8 ]
-
-Raid1 reshape will change mempool and r1conf::raid_disks which are
-needed to free r1bio. allow_barrier() make a concurrent raid1_reshape()
-possible. So, free the in-flight r1bio before waiting blocked rdev.
-
-Fixes: 6bfe0b499082 ("md: support blocking writes to an array on device failure")
-Reviewed-by: Yu Kuai <yukuai3@huawei.com>
-Signed-off-by: Xueshi Hu <xueshi.hu@smartx.com>
-Link: https://lore.kernel.org/r/20230814135356.1113639-3-xueshi.hu@smartx.com
-Signed-off-by: Song Liu <song@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/md/raid1.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
-index e51b77a3a8397..ebbe41a33b821 100644
---- a/drivers/md/raid1.c
-+++ b/drivers/md/raid1.c
-@@ -1370,6 +1370,7 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
-               return;
-       }
-+ retry_write:
-       r1_bio = alloc_r1bio(mddev, bio);
-       r1_bio->sectors = max_write_sectors;
-@@ -1385,7 +1386,6 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
-        */
-       disks = conf->raid_disks * 2;
-- retry_write:
-       blocked_rdev = NULL;
-       rcu_read_lock();
-       max_sectors = r1_bio->sectors;
-@@ -1465,7 +1465,7 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
-               for (j = 0; j < i; j++)
-                       if (r1_bio->bios[j])
-                               rdev_dec_pending(conf->mirrors[j].rdev, mddev);
--              r1_bio->state = 0;
-+              free_r1bio(r1_bio);
-               allow_barrier(conf, bio->bi_iter.bi_sector);
-               if (bio->bi_opf & REQ_NOWAIT) {
--- 
-2.40.1
-
diff --git a/queue-6.4/md-raid1-hold-the-barrier-until-handle_read_error-fi.patch b/queue-6.4/md-raid1-hold-the-barrier-until-handle_read_error-fi.patch
deleted file mode 100644 (file)
index 4fcd5a1..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-From 7836951b418bc7d42ca525f850742d054831cd6c Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 14 Aug 2023 21:53:56 +0800
-Subject: md/raid1: hold the barrier until handle_read_error() finishes
-
-From: Xueshi Hu <xueshi.hu@smartx.com>
-
-[ Upstream commit c069da449a13669ffa754fd971747e7e17e7d691 ]
-
-handle_read_error() will call allow_barrier() to match the former barrier
-raising. However, it should put the allow_barrier() at the end to avoid a
-concurrent raid reshape.
-
-Fixes: 689389a06ce7 ("md/raid1: simplify handle_read_error().")
-Reviewed-by: Yu Kuai <yukuai3@huawei.com>
-Signed-off-by: Xueshi Hu <xueshi.hu@smartx.com>
-Link: https://lore.kernel.org/r/20230814135356.1113639-4-xueshi.hu@smartx.com
-Signed-off-by: Song Liu <song@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/md/raid1.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
-index ebbe41a33b821..975301f2debdd 100644
---- a/drivers/md/raid1.c
-+++ b/drivers/md/raid1.c
-@@ -2495,6 +2495,7 @@ static void handle_read_error(struct r1conf *conf, struct r1bio *r1_bio)
-       struct mddev *mddev = conf->mddev;
-       struct bio *bio;
-       struct md_rdev *rdev;
-+      sector_t sector;
-       clear_bit(R1BIO_ReadError, &r1_bio->state);
-       /* we got a read error. Maybe the drive is bad.  Maybe just
-@@ -2524,12 +2525,13 @@ static void handle_read_error(struct r1conf *conf, struct r1bio *r1_bio)
-       }
-       rdev_dec_pending(rdev, conf->mddev);
--      allow_barrier(conf, r1_bio->sector);
-+      sector = r1_bio->sector;
-       bio = r1_bio->master_bio;
-       /* Reuse the old r1_bio so that the IO_BLOCKED settings are preserved */
-       r1_bio->state = 0;
-       raid1_read_request(mddev, bio, r1_bio->sectors, r1_bio);
-+      allow_barrier(conf, sector);
- }
- static void raid1d(struct md_thread *thread)
--- 
-2.40.1
-
index 37ed1b964a4b8086b7e623aa511dae1b11e8044b..4a2215f39e1490632b67ae015d57442c879ff1fe 100644 (file)
@@ -390,8 +390,6 @@ md-raid5-cache-fix-a-deadlock-in-r5l_exit_log.patch
 md-raid5-cache-fix-null-ptr-deref-for-r5l_flush_stri.patch
 firmware-cs_dsp-fix-new-control-name-check.patch
 blk-cgroup-fix-null-deref-caused-by-blkg_policy_data.patch
-md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch
-md-raid1-hold-the-barrier-until-handle_read_error-fi.patch
 md-raid0-factor-out-helper-for-mapping-and-submittin.patch
 md-raid0-fix-performance-regression-for-large-sequen.patch
 md-raid0-account-for-split-bio-in-iostat-accounting.patch
diff --git a/queue-6.5/md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch b/queue-6.5/md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch
deleted file mode 100644 (file)
index 0daf948..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-From 4d6d379413084db195f194f69b9aae285aab3e12 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 14 Aug 2023 21:53:55 +0800
-Subject: md/raid1: free the r1bio before waiting for blocked rdev
-
-From: Xueshi Hu <xueshi.hu@smartx.com>
-
-[ Upstream commit 992db13a4aee766c8bfbf046ad15c2db5fa7cab8 ]
-
-Raid1 reshape will change mempool and r1conf::raid_disks which are
-needed to free r1bio. allow_barrier() make a concurrent raid1_reshape()
-possible. So, free the in-flight r1bio before waiting blocked rdev.
-
-Fixes: 6bfe0b499082 ("md: support blocking writes to an array on device failure")
-Reviewed-by: Yu Kuai <yukuai3@huawei.com>
-Signed-off-by: Xueshi Hu <xueshi.hu@smartx.com>
-Link: https://lore.kernel.org/r/20230814135356.1113639-3-xueshi.hu@smartx.com
-Signed-off-by: Song Liu <song@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/md/raid1.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
-index dd25832eb0452..f6a33c7824a70 100644
---- a/drivers/md/raid1.c
-+++ b/drivers/md/raid1.c
-@@ -1373,6 +1373,7 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
-               return;
-       }
-+ retry_write:
-       r1_bio = alloc_r1bio(mddev, bio);
-       r1_bio->sectors = max_write_sectors;
-@@ -1388,7 +1389,6 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
-        */
-       disks = conf->raid_disks * 2;
-- retry_write:
-       blocked_rdev = NULL;
-       rcu_read_lock();
-       max_sectors = r1_bio->sectors;
-@@ -1468,7 +1468,7 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
-               for (j = 0; j < i; j++)
-                       if (r1_bio->bios[j])
-                               rdev_dec_pending(conf->mirrors[j].rdev, mddev);
--              r1_bio->state = 0;
-+              free_r1bio(r1_bio);
-               allow_barrier(conf, bio->bi_iter.bi_sector);
-               if (bio->bi_opf & REQ_NOWAIT) {
--- 
-2.40.1
-
diff --git a/queue-6.5/md-raid1-hold-the-barrier-until-handle_read_error-fi.patch b/queue-6.5/md-raid1-hold-the-barrier-until-handle_read_error-fi.patch
deleted file mode 100644 (file)
index c54fb31..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-From bbd8645f9779d83cc281b54bd2ed7edd65b130b1 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 14 Aug 2023 21:53:56 +0800
-Subject: md/raid1: hold the barrier until handle_read_error() finishes
-
-From: Xueshi Hu <xueshi.hu@smartx.com>
-
-[ Upstream commit c069da449a13669ffa754fd971747e7e17e7d691 ]
-
-handle_read_error() will call allow_barrier() to match the former barrier
-raising. However, it should put the allow_barrier() at the end to avoid a
-concurrent raid reshape.
-
-Fixes: 689389a06ce7 ("md/raid1: simplify handle_read_error().")
-Reviewed-by: Yu Kuai <yukuai3@huawei.com>
-Signed-off-by: Xueshi Hu <xueshi.hu@smartx.com>
-Link: https://lore.kernel.org/r/20230814135356.1113639-4-xueshi.hu@smartx.com
-Signed-off-by: Song Liu <song@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/md/raid1.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
-index f6a33c7824a70..733518a37516b 100644
---- a/drivers/md/raid1.c
-+++ b/drivers/md/raid1.c
-@@ -2498,6 +2498,7 @@ static void handle_read_error(struct r1conf *conf, struct r1bio *r1_bio)
-       struct mddev *mddev = conf->mddev;
-       struct bio *bio;
-       struct md_rdev *rdev;
-+      sector_t sector;
-       clear_bit(R1BIO_ReadError, &r1_bio->state);
-       /* we got a read error. Maybe the drive is bad.  Maybe just
-@@ -2527,12 +2528,13 @@ static void handle_read_error(struct r1conf *conf, struct r1bio *r1_bio)
-       }
-       rdev_dec_pending(rdev, conf->mddev);
--      allow_barrier(conf, r1_bio->sector);
-+      sector = r1_bio->sector;
-       bio = r1_bio->master_bio;
-       /* Reuse the old r1_bio so that the IO_BLOCKED settings are preserved */
-       r1_bio->state = 0;
-       raid1_read_request(mddev, bio, r1_bio->sectors, r1_bio);
-+      allow_barrier(conf, sector);
- }
- static void raid1d(struct md_thread *thread)
--- 
-2.40.1
-
index 4b13d66d498ea1b46cea3b27737ef7f5138ed1d3..2b57b3d2ac5dafa1a95acc836366dc8ae606ab1d 100644 (file)
@@ -350,8 +350,6 @@ md-raid5-cache-fix-a-deadlock-in-r5l_exit_log.patch
 md-raid5-cache-fix-null-ptr-deref-for-r5l_flush_stri.patch
 firmware-cs_dsp-fix-new-control-name-check.patch
 blk-cgroup-fix-null-deref-caused-by-blkg_policy_data.patch
-md-raid1-free-the-r1bio-before-waiting-for-blocked-r.patch
-md-raid1-hold-the-barrier-until-handle_read_error-fi.patch
 md-raid0-factor-out-helper-for-mapping-and-submittin.patch
 md-raid0-fix-performance-regression-for-large-sequen.patch
 md-raid0-account-for-split-bio-in-iostat-accounting.patch