summaryrefslogtreecommitdiffstats
path: root/drivers/md/raid5.c
diff options
context:
space:
mode:
authorShaohua Li <shli@fb.com>2015-08-13 23:32:04 +0200
committerNeilBrown <neilb@suse.com>2015-11-01 03:48:26 +0100
commit5c7e81c3de9eb3db01e16190a1da0899efee645b (patch)
tree3abff5f4c664ceeb23949099700890201c01105f /drivers/md/raid5.c
parentraid5: don't allow resize/reshape with cache(log) support (diff)
downloadlinux-5c7e81c3de9eb3db01e16190a1da0899efee645b.tar.xz
linux-5c7e81c3de9eb3db01e16190a1da0899efee645b.zip
raid5: enable log for raid array with cache disk
Now log is safe to enable for raid array with cache disk Signed-off-by: Shaohua Li <shli@fb.com> Signed-off-by: NeilBrown <neilb@suse.com>
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r--drivers/md/raid5.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 122702d957a6..b0bf81d084fd 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -6329,8 +6329,11 @@ static void raid5_free_percpu(struct r5conf *conf)
static void free_conf(struct r5conf *conf)
{
+ if (conf->log)
+ r5l_exit_log(conf->log);
if (conf->shrinker.seeks)
unregister_shrinker(&conf->shrinker);
+
free_thread_groups(conf);
shrink_stripes(conf);
raid5_free_percpu(conf);
@@ -6996,6 +6999,14 @@ static int run(struct mddev *mddev)
mddev->queue);
}
+ if (journal_dev) {
+ char b[BDEVNAME_SIZE];
+
+ printk(KERN_INFO"md/raid:%s: using device %s as journal\n",
+ mdname(mddev), bdevname(journal_dev->bdev, b));
+ r5l_init_log(conf, journal_dev);
+ }
+
return 0;
abort:
md_unregister_thread(&mddev->thread);