diff options
author | Shaohua Li <shli@fb.com> | 2016-12-09 00:48:17 +0100 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2016-12-09 07:00:11 +0100 |
commit | 6995f0b247e15e34fbcd10852c08b30bdc1a78da (patch) | |
tree | cf269278686e1ace761edded6fe4e7ae64417920 /drivers/md/raid0.c | |
parent | md/r5cache: after recovery, increase journal seq by 10000 (diff) | |
download | linux-6995f0b247e15e34fbcd10852c08b30bdc1a78da.tar.xz linux-6995f0b247e15e34fbcd10852c08b30bdc1a78da.zip |
md: takeover should clear unrelated bits
When we change level from raid1 to raid5, the MD_FAILFAST_SUPPORTED bit
will be accidentally set, but raid5 doesn't support it. The same is true
for the MD_HAS_JOURNAL bit.
Fix: 46533ff (md: Use REQ_FAILFAST_* on metadata writes where appropriate)
Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md/raid0.c')
-rw-r--r-- | drivers/md/raid0.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index e628f187e5ad..a162fedeb51a 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c @@ -539,8 +539,11 @@ static void *raid0_takeover_raid45(struct mddev *mddev) mddev->delta_disks = -1; /* make sure it will be not marked as dirty */ mddev->recovery_cp = MaxSector; + clear_bit(MD_HAS_JOURNAL, &mddev->flags); + clear_bit(MD_JOURNAL_CLEAN, &mddev->flags); create_strip_zones(mddev, &priv_conf); + return priv_conf; } @@ -580,6 +583,7 @@ static void *raid0_takeover_raid10(struct mddev *mddev) mddev->degraded = 0; /* make sure it will be not marked as dirty */ mddev->recovery_cp = MaxSector; + clear_bit(MD_FAILFAST_SUPPORTED, &mddev->flags); create_strip_zones(mddev, &priv_conf); return priv_conf; @@ -622,6 +626,7 @@ static void *raid0_takeover_raid1(struct mddev *mddev) mddev->raid_disks = 1; /* make sure it will be not marked as dirty */ mddev->recovery_cp = MaxSector; + clear_bit(MD_FAILFAST_SUPPORTED, &mddev->flags); create_strip_zones(mddev, &priv_conf); return priv_conf; |