summaryrefslogtreecommitdiffstats
path: root/drivers/md/raid1.c
diff options
context:
space:
mode:
authorShaohua Li <shli@fb.com>2016-12-08 15:48:17 -0800
committerShaohua Li <shli@fb.com>2016-12-08 22:00:11 -0800
commit6995f0b247e15e34fbcd10852c08b30bdc1a78da (patch)
treecf269278686e1ace761edded6fe4e7ae64417920 /drivers/md/raid1.c
parent3c6edc66085e1d895a698c572bbfaf4d57fdb771 (diff)
downloadtalos-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.c5
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);
OpenPOWER on IntegriCloud