diff options
author | Goldwyn Rodrigues <rgoldwyn@suse.com> | 2014-06-07 00:52:29 -0500 |
---|---|---|
committer | Goldwyn Rodrigues <rgoldwyn@suse.com> | 2015-02-23 09:59:06 -0600 |
commit | 4b26a08af92c0d9c0bce07612b56ff326112321a (patch) | |
tree | 5b04df02371bdb2705dbb3af2e9fc09e92223f65 /drivers/md | |
parent | e94987db2ed983aea4e45d22db9e17c6bbf2a623 (diff) | |
download | talos-op-linux-4b26a08af92c0d9c0bce07612b56ff326112321a.tar.gz talos-op-linux-4b26a08af92c0d9c0bce07612b56ff326112321a.zip |
Perform resync for cluster node failure
If bitmap_copy_slot returns hi>0, we need to perform resync.
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/md-cluster.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/md/md-cluster.c b/drivers/md/md-cluster.c index 1f82d0d731ae..d2987130be34 100644 --- a/drivers/md/md-cluster.c +++ b/drivers/md/md-cluster.c @@ -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); |