Commit 343d04d4 authored by Linus Torvalds's avatar Linus Torvalds

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.
parents 653d48b2 ddcf3522
...@@ -1643,7 +1643,9 @@ static void super_1_sync(mddev_t *mddev, mdk_rdev_t *rdev) ...@@ -1643,7 +1643,9 @@ static void super_1_sync(mddev_t *mddev, mdk_rdev_t *rdev)
bmask = queue_logical_block_size(rdev->bdev->bd_disk->queue)-1; bmask = queue_logical_block_size(rdev->bdev->bd_disk->queue)-1;
if (rdev->sb_size & bmask) if (rdev->sb_size & bmask)
rdev->sb_size = (rdev->sb_size | bmask) + 1; rdev->sb_size = (rdev->sb_size | bmask) + 1;
} } else
max_dev = le32_to_cpu(sb->max_dev);
for (i=0; i<max_dev;i++) for (i=0; i<max_dev;i++)
sb->dev_roles[i] = cpu_to_le16(0xfffe); sb->dev_roles[i] = cpu_to_le16(0xfffe);
...@@ -7069,7 +7071,7 @@ void md_check_recovery(mddev_t *mddev) ...@@ -7069,7 +7071,7 @@ void md_check_recovery(mddev_t *mddev)
if (mddev->ro && !test_bit(MD_RECOVERY_NEEDED, &mddev->recovery)) if (mddev->ro && !test_bit(MD_RECOVERY_NEEDED, &mddev->recovery))
return; return;
if ( ! ( if ( ! (
(mddev->flags && !mddev->external) || (mddev->flags & ~ (1<<MD_CHANGE_PENDING)) ||
test_bit(MD_RECOVERY_NEEDED, &mddev->recovery) || test_bit(MD_RECOVERY_NEEDED, &mddev->recovery) ||
test_bit(MD_RECOVERY_DONE, &mddev->recovery) || test_bit(MD_RECOVERY_DONE, &mddev->recovery) ||
(mddev->external == 0 && mddev->safemode == 1) || (mddev->external == 0 && mddev->safemode == 1) ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment