summaryrefslogtreecommitdiff
path: root/drivers/md/raid5-cache.c
diff options
context:
space:
mode:
authorShaohua Li <shli@fb.com>2016-01-07 01:37:13 +0300
committerNeilBrown <neilb@suse.com>2016-01-14 03:49:43 +0300
commita62ab49eb502a07814f9942770893118c6281223 (patch)
treef83e3f553bcf0e9bcbe7cd18882da8f8a984eeb8 /drivers/md/raid5-cache.c
parent274d8cbde1bc3bdfb31c5d6a58113dff5cee4f87 (diff)
downloadlinux-a62ab49eb502a07814f9942770893118c6281223.tar.xz
md: set MD_HAS_JOURNAL in correct places
Set MD_HAS_JOURNAL when a array is loaded or journal is initialized. This is to avoid the flags set too early in journal disk hotadd. Signed-off-by: Shaohua Li <shli@fb.com> Signed-off-by: NeilBrown <neilb@suse.com>
Diffstat (limited to 'drivers/md/raid5-cache.c')
-rw-r--r--drivers/md/raid5-cache.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/raid5-cache.c b/drivers/md/raid5-cache.c
index 6d2b4789a928..7ac035a73281 100644
--- a/drivers/md/raid5-cache.c
+++ b/drivers/md/raid5-cache.c
@@ -1235,6 +1235,7 @@ int r5l_init_log(struct r5conf *conf, struct md_rdev *rdev)
goto error;
rcu_assign_pointer(conf->log, log);
+ set_bit(MD_HAS_JOURNAL, &conf->mddev->flags);
return 0;
error: