This is a note to let you know that I've just added the patch titled
md: fix regression with re-adding devices to arrays with no metadata
to the 2.6.36-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:
md-fix-regression-with-re-adding-devices-to-arrays-with-no-metadata.patch
and it can be found in the queue-2.6.36 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From bf572541ab44240163eaa2d486b06f306a31d45a Mon Sep 17 00:00:00 2001
From: NeilBrown <[email protected]>
Date: Wed, 12 Jan 2011 09:03:35 +1100
Subject: md: fix regression with re-adding devices to arrays with no metadata
From: NeilBrown <[email protected]>
commit bf572541ab44240163eaa2d486b06f306a31d45a upstream.
Commit 1a855a0606 (2.6.37-rc4) fixed a problem where devices were
re-added when they shouldn't be but caused a regression in a less
common case that means sometimes devices cannot be re-added when they
should be.
In particular, when re-adding a device to an array without metadata
we should always access the device, but after the above commit we
didn't.
This patch sets the In_sync flag in that case so that the re-add
succeeds.
This patch is suitable for any -stable kernel to which 1a855a0606 was
applied.
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/md/md.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -5150,9 +5150,10 @@ static int add_new_disk(mddev_t * mddev,
/* set saved_raid_disk if appropriate */
if (!mddev->persistent) {
if (info->state & (1<<MD_DISK_SYNC) &&
- info->raid_disk < mddev->raid_disks)
+ info->raid_disk < mddev->raid_disks) {
rdev->raid_disk = info->raid_disk;
- else
+ set_bit(In_sync, &rdev->flags);
+ } else
rdev->raid_disk = -1;
} else
super_types[mddev->major_version].
Patches currently in stable-queue which might be from [email protected] are
queue-2.6.36/md-fix-removal-of-extra-drives-when-converting-raid6-to-raid5.patch
queue-2.6.36/md-fix-regression-resulting-in-delays-in-clearing-bits-in-a-bitmap.patch
queue-2.6.36/md_make_request-don-t-touch-the-bio-after-calling-make_request.patch
queue-2.6.36/md-fix-regression-with-re-adding-devices-to-arrays-with-no-metadata.patch
queue-2.6.36/md-ensure-no-io-request-to-get-md-device-before-it-is-properly-initialised.patch
_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable