Skip to contentSkip to conversation

Perform resync for cluster node failure

PATCH In review Goldwyn Rodrigues 1 participant 1 message Dec 18, 2014 MD RAID

lore
Share & tools
lore
#0 lore raw

PATCH 15/24 Perform resync for cluster node failure

If bitmap_copy_slot returns hi>0, we need to perform resync.

---
 drivers/md/md-cluster.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
drivers/md/md-cluster.c +11 -1
index 4f1ea5f..617ffee 100644
@@ -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);
Signature · 1 line
2.1.2