[3.16.y-ckt stable] Patch "Revert "md: allow a partially recovered device to be hot-added to an array."" has been added to staging queue
Luis Henriques
luis.henriques at canonical.com
Thu Nov 12 16:48:07 UTC 2015
This is a note to let you know that I have just added a patch titled
Revert "md: allow a partially recovered device to be hot-added to an array."
to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.16.y-queue
This patch is scheduled to be released in version 3.16.7-ckt20.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.16.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Luis
------
>From 697d053ab6f51af5ec2567594e76eb9b34ce8f68 Mon Sep 17 00:00:00 2001
From: NeilBrown <neilb at suse.com>
Date: Sat, 31 Oct 2015 11:00:56 +1100
Subject: Revert "md: allow a partially recovered device to be hot-added to an
array."
commit d01552a76d71f9879af448e9142389ee9be6e95b upstream.
This reverts commit 7eb418851f3278de67126ea0c427641ab4792c57.
This commit is poorly justified, I can find not discusison in email,
and it clearly causes a problem.
If a device which is being recovered fails and is subsequently
re-added to an array, there could easily have been changes to the
array *before* the point where the recovery was up to. So the
recovery must start again from the beginning.
If a spare is being recovered and fails, then when it is re-added we
really should do a bitmap-based recovery up to the recovery-offset,
and then a full recovery from there. Before this reversion, we only
did the "full recovery from there" which is not corect. After this
reversion with will do a full recovery from the start, which is safer
but not ideal.
It will be left to a future patch to arrange the two different styles
of recovery.
Reported-and-tested-by: Nate Dailey <nate.dailey at stratus.com>
Signed-off-by: NeilBrown <neilb at suse.com>
Fixes: 7eb418851f32 ("md: allow a partially recovered device to be hot-added to an array.")
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
drivers/md/md.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 9fc6c5de0638..4bd7f2729c16 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -7772,8 +7772,7 @@ static int remove_and_add_spares(struct mddev *mddev,
!test_bit(Bitmap_sync, &rdev->flags)))
continue;
- if (rdev->saved_raid_disk < 0)
- rdev->recovery_offset = 0;
+ rdev->recovery_offset = 0;
if (mddev->pers->
hot_add_disk(mddev, rdev) == 0) {
if (sysfs_link_rdev(mddev, rdev))
More information about the kernel-team
mailing list