This is a note to let you know that I've just added the patch titled

    Revert "md: allow a partially recovered device to be hot-added to an array."

to the 4.2-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     
revert-md-allow-a-partially-recovered-device-to-be-hot-added-to-an-array.patch
and it can be found in the queue-4.2 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From d01552a76d71f9879af448e9142389ee9be6e95b Mon Sep 17 00:00:00 2001
From: NeilBrown <[email protected]>
Date: Sat, 31 Oct 2015 11:00:56 +1100
Subject: Revert "md: allow a partially recovered device to be hot-added to an 
array."

From: NeilBrown <[email protected]>

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 <[email protected]>
Signed-off-by: NeilBrown <[email protected]>
Fixes: 7eb418851f32 ("md: allow a partially recovered device to be hot-added to 
an array.")
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/md/md.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -8030,8 +8030,7 @@ static int remove_and_add_spares(struct
                       !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))


Patches currently in stable-queue which might be from [email protected] are

queue-4.2/revert-md-allow-a-partially-recovered-device-to-be-hot-added-to-an-array.patch
queue-4.2/md-raid1-submit_bio_wait-returns-0-on-success.patch
queue-4.2/md-raid10-submit_bio_wait-returns-0-on-success.patch
queue-4.2/md-raid5-fix-locking-in-handle_stripe_clean_event.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to