* [PATCH 15/24] Perform resync for cluster node failure
@ 2014-12-18 16:17 Goldwyn Rodrigues
0 siblings, 0 replies; only message in thread
From: Goldwyn Rodrigues @ 2014-12-18 16:17 UTC (permalink / raw)
To: neilb; +Cc: lzhong, linux-raid
If bitmap_copy_slot returns hi>0, we need to perform resync.
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
---
drivers/md/md-cluster.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/md/md-cluster.c b/drivers/md/md-cluster.c
index 4f1ea5f..617ffee 100644
--- a/drivers/md/md-cluster.c
+++ b/drivers/md/md-cluster.c
@@ -226,9 +226,19 @@ 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);
--
2.1.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-12-18 16:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-18 16:17 [PATCH 15/24] Perform resync for cluster node failure Goldwyn Rodrigues
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox