md: Fix regression with raid1 arrays without persistent metadata.
authorNeilBrown <neilb@suse.de>
Thu, 28 Oct 2010 06:30:20 +0000 (17:30 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 28 Oct 2010 06:30:20 +0000 (17:30 +1100)
A RAID1 which has no persistent metadata, whether internal or
external, will hang on the first write.
This is caused by commit  070dc6dd7103b6b3f7e4d46e754354a5c15f366e
In that case, MD_CHANGE_PENDING never gets cleared.

So during md_update_sb, is neither persistent or external,
clear MD_CHANGE_PENDING.

This is suitable for 2.6.36-stable.

Signed-off-by: NeilBrown <neilb@suse.de>
Cc: stable@kernel.org
drivers/md/md.c

index 225815197a3d69fba134433ab269d0c9a255681b..64f97168cefa5a846666c3a54b6c75638020dc66 100644 (file)
@@ -2108,6 +2108,8 @@ repeat:
        if (!mddev->persistent) {
                clear_bit(MD_CHANGE_CLEAN, &mddev->flags);
                clear_bit(MD_CHANGE_DEVS, &mddev->flags);
+               if (!mddev->external)
+                       clear_bit(MD_CHANGE_PENDING, &mddev->flags);
                wake_up(&mddev->sb_wait);
                return;
        }