diff options
Diffstat (limited to 'drivers/md/raid5-cache.c')
-rw-r--r-- | drivers/md/raid5-cache.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/md/raid5-cache.c b/drivers/md/raid5-cache.c index 5c8640c86b90..5f82dabdda6f 100644 --- a/drivers/md/raid5-cache.c +++ b/drivers/md/raid5-cache.c | |||
@@ -344,6 +344,8 @@ void r5c_handle_cached_data_endio(struct r5conf *conf, | |||
344 | } | 344 | } |
345 | } | 345 | } |
346 | 346 | ||
347 | void r5l_wake_reclaim(struct r5l_log *log, sector_t space); | ||
348 | |||
347 | /* Check whether we should flush some stripes to free up stripe cache */ | 349 | /* Check whether we should flush some stripes to free up stripe cache */ |
348 | void r5c_check_stripe_cache_usage(struct r5conf *conf) | 350 | void r5c_check_stripe_cache_usage(struct r5conf *conf) |
349 | { | 351 | { |
@@ -2749,9 +2751,7 @@ void r5c_finish_stripe_write_out(struct r5conf *conf, | |||
2749 | } | 2751 | } |
2750 | } | 2752 | } |
2751 | 2753 | ||
2752 | int | 2754 | int r5c_cache_data(struct r5l_log *log, struct stripe_head *sh) |
2753 | r5c_cache_data(struct r5l_log *log, struct stripe_head *sh, | ||
2754 | struct stripe_head_state *s) | ||
2755 | { | 2755 | { |
2756 | struct r5conf *conf = sh->raid_conf; | 2756 | struct r5conf *conf = sh->raid_conf; |
2757 | int pages = 0; | 2757 | int pages = 0; |
@@ -2914,6 +2914,10 @@ int r5l_init_log(struct r5conf *conf, struct md_rdev *rdev) | |||
2914 | { | 2914 | { |
2915 | struct request_queue *q = bdev_get_queue(rdev->bdev); | 2915 | struct request_queue *q = bdev_get_queue(rdev->bdev); |
2916 | struct r5l_log *log; | 2916 | struct r5l_log *log; |
2917 | char b[BDEVNAME_SIZE]; | ||
2918 | |||
2919 | pr_debug("md/raid:%s: using device %s as journal\n", | ||
2920 | mdname(conf->mddev), bdevname(rdev->bdev, b)); | ||
2917 | 2921 | ||
2918 | if (PAGE_SIZE != 4096) | 2922 | if (PAGE_SIZE != 4096) |
2919 | return -EINVAL; | 2923 | return -EINVAL; |
@@ -3016,8 +3020,13 @@ io_kc: | |||
3016 | return -EINVAL; | 3020 | return -EINVAL; |
3017 | } | 3021 | } |
3018 | 3022 | ||
3019 | void r5l_exit_log(struct r5l_log *log) | 3023 | void r5l_exit_log(struct r5conf *conf) |
3020 | { | 3024 | { |
3025 | struct r5l_log *log = conf->log; | ||
3026 | |||
3027 | conf->log = NULL; | ||
3028 | synchronize_rcu(); | ||
3029 | |||
3021 | flush_work(&log->disable_writeback_work); | 3030 | flush_work(&log->disable_writeback_work); |
3022 | md_unregister_thread(&log->reclaim_thread); | 3031 | md_unregister_thread(&log->reclaim_thread); |
3023 | mempool_destroy(log->meta_pool); | 3032 | mempool_destroy(log->meta_pool); |