提交 4b26a08a 编写于 作者: G Goldwyn Rodrigues

Perform resync for cluster node failure

If bitmap_copy_slot returns hi>0, we need to perform resync.
Signed-off-by: NGoldwyn Rodrigues <rgoldwyn@suse.com>
上级 e94987db
......@@ -223,8 +223,18 @@ void recover_bitmaps(struct md_thread *thread)
goto clear_bit;
}
ret = bitmap_copy_from_slot(mddev, slot, &lo, &hi);
if (ret)
if (ret) {
pr_err("md-cluster: Could not copy data from bitmap %d\n", slot);
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);
}
dlm_unlock:
dlm_unlock_sync(bm_lockres);
clear_bit:
clear_bit(slot, &cinfo->recovery_map);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册