2.6.35-longterm review patch. If anyone has any objections, please let me know.
------------------ 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]> Signed-off-by: Andi Kleen <[email protected]> --- drivers/md/md.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Index: linux-2.6.35.y/drivers/md/md.c =================================================================== --- linux-2.6.35.y.orig/drivers/md/md.c 2011-03-29 22:51:42.038647504 -0700 +++ linux-2.6.35.y/drivers/md/md.c 2011-03-29 23:54:36.691063594 -0700 @@ -5109,9 +5109,10 @@ /* 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]. _______________________________________________ stable mailing list [email protected] http://linux.kernel.org/mailman/listinfo/stable
