aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-09-17 13:22:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-09-17 13:22:48 -0400
commit343d04d44bb069064180f5763a41acaa9245f8e6 (patch)
treecdb2b444a4f45ec9b629b9cc7897090de8352846 /drivers
parent653d48b22166db2d8b1515ebe6f9f0f7c95dfc86 (diff)
parentddcf3522cf03a147c867a2e0155761652dbd156a (diff)
Merge branch 'for-linus' of git://neil.brown.name/md
* 'for-linus' of git://neil.brown.name/md: md: fix v1.x metadata update when a disk is missing. md: call md_update_sb even for 'external' metadata arrays.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/md.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 43cf9cc9c1df..f20d13e717d5 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -1643,7 +1643,9 @@ static void super_1_sync(mddev_t *mddev, mdk_rdev_t *rdev)
1643 bmask = queue_logical_block_size(rdev->bdev->bd_disk->queue)-1; 1643 bmask = queue_logical_block_size(rdev->bdev->bd_disk->queue)-1;
1644 if (rdev->sb_size & bmask) 1644 if (rdev->sb_size & bmask)
1645 rdev->sb_size = (rdev->sb_size | bmask) + 1; 1645 rdev->sb_size = (rdev->sb_size | bmask) + 1;
1646 } 1646 } else
1647 max_dev = le32_to_cpu(sb->max_dev);
1648
1647 for (i=0; i<max_dev;i++) 1649 for (i=0; i<max_dev;i++)
1648 sb->dev_roles[i] = cpu_to_le16(0xfffe); 1650 sb->dev_roles[i] = cpu_to_le16(0xfffe);
1649 1651
@@ -7069,7 +7071,7 @@ void md_check_recovery(mddev_t *mddev)
7069 if (mddev->ro && !test_bit(MD_RECOVERY_NEEDED, &mddev->recovery)) 7071 if (mddev->ro && !test_bit(MD_RECOVERY_NEEDED, &mddev->recovery))
7070 return; 7072 return;
7071 if ( ! ( 7073 if ( ! (
7072 (mddev->flags && !mddev->external) || 7074 (mddev->flags & ~ (1<<MD_CHANGE_PENDING)) ||
7073 test_bit(MD_RECOVERY_NEEDED, &mddev->recovery) || 7075 test_bit(MD_RECOVERY_NEEDED, &mddev->recovery) ||
7074 test_bit(MD_RECOVERY_DONE, &mddev->recovery) || 7076 test_bit(MD_RECOVERY_DONE, &mddev->recovery) ||
7075 (mddev->external == 0 && mddev->safemode == 1) || 7077 (mddev->external == 0 && mddev->safemode == 1) ||