diff options
author | Shaohua Li <shli@fb.com> | 2016-12-08 15:48:17 -0800 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2016-12-08 22:00:11 -0800 |
commit | 6995f0b247e15e34fbcd10852c08b30bdc1a78da (patch) | |
tree | cf269278686e1ace761edded6fe4e7ae64417920 /drivers/md/raid1.c | |
parent | 3c6edc66085e1d895a698c572bbfaf4d57fdb771 (diff) | |
download | talos-op-linux-6995f0b247e15e34fbcd10852c08b30bdc1a78da.tar.gz talos-op-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/raid1.c')
-rw-r--r-- | drivers/md/raid1.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 94e0afce6d4c..efc2e744cfd3 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -3243,9 +3243,12 @@ static void *raid1_takeover(struct mddev *mddev) mddev->new_layout = 0; mddev->new_chunk_sectors = 0; conf = setup_conf(mddev); - if (!IS_ERR(conf)) + if (!IS_ERR(conf)) { /* Array must appear to be quiesced */ conf->array_frozen = 1; + clear_bit(MD_HAS_JOURNAL, &mddev->flags); + clear_bit(MD_JOURNAL_CLEAN, &mddev->flags); + } return conf; } return ERR_PTR(-EINVAL); |