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>
This commit is contained in:
parent
713cf5a639
commit
5c7e81c3de
|
@ -6329,8 +6329,11 @@ static void raid5_free_percpu(struct r5conf *conf)
|
||||||
|
|
||||||
static void free_conf(struct r5conf *conf)
|
static void free_conf(struct r5conf *conf)
|
||||||
{
|
{
|
||||||
|
if (conf->log)
|
||||||
|
r5l_exit_log(conf->log);
|
||||||
if (conf->shrinker.seeks)
|
if (conf->shrinker.seeks)
|
||||||
unregister_shrinker(&conf->shrinker);
|
unregister_shrinker(&conf->shrinker);
|
||||||
|
|
||||||
free_thread_groups(conf);
|
free_thread_groups(conf);
|
||||||
shrink_stripes(conf);
|
shrink_stripes(conf);
|
||||||
raid5_free_percpu(conf);
|
raid5_free_percpu(conf);
|
||||||
|
@ -6996,6 +6999,14 @@ static int run(struct mddev *mddev)
|
||||||
mddev->queue);
|
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;
|
return 0;
|
||||||
abort:
|
abort:
|
||||||
md_unregister_thread(&mddev->thread);
|
md_unregister_thread(&mddev->thread);
|
||||||
|
|
|
@ -322,6 +322,7 @@ struct mdp_superblock_1 {
|
||||||
|MD_FEATURE_NEW_OFFSET \
|
|MD_FEATURE_NEW_OFFSET \
|
||||||
|MD_FEATURE_RECOVERY_BITMAP \
|
|MD_FEATURE_RECOVERY_BITMAP \
|
||||||
|MD_FEATURE_CLUSTERED \
|
|MD_FEATURE_CLUSTERED \
|
||||||
|
|MD_FEATURE_JOURNAL \
|
||||||
)
|
)
|
||||||
|
|
||||||
struct r5l_payload_header {
|
struct r5l_payload_header {
|
||||||
|
|
Loading…
Reference in a new issue