diff options
author | Guoqing Jiang <gqjiang@suse.com> | 2016-05-02 17:33:10 +0200 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2016-05-04 21:39:35 +0200 |
commit | eb315cd0933b903126996e79c12cb1eae617a036 (patch) | |
tree | 4a79ed1bc6c91d551b5bfce23e25e8081fea7ac9 /drivers/md/md-cluster.c | |
parent | md-cluser: make resync_finish only called after pers->sync_request (diff) | |
download | linux-eb315cd0933b903126996e79c12cb1eae617a036.tar.xz linux-eb315cd0933b903126996e79c12cb1eae617a036.zip |
md-cluster: wake up thread to continue recovery
In recovery case, we need to set MD_RECOVERY_NEEDED
and wake up thread only if recover is not finished.
Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md/md-cluster.c')
-rw-r--r-- | drivers/md/md-cluster.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/md/md-cluster.c b/drivers/md/md-cluster.c index 12fbfeced238..0d4ddf85d607 100644 --- a/drivers/md/md-cluster.c +++ b/drivers/md/md-cluster.c @@ -284,11 +284,14 @@ static void recover_bitmaps(struct md_thread *thread) goto dlm_unlock; } if (hi > 0) { - /* TODO:Wait for current resync to get over */ - set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); if (lo < mddev->recovery_cp) mddev->recovery_cp = lo; - md_check_recovery(mddev); + /* wake up thread to continue resync in case resync + * is not finished */ + if (mddev->recovery_cp != MaxSector) { + set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); + md_wakeup_thread(mddev->thread); + } } dlm_unlock: dlm_unlock_sync(bm_lockres); |