Perform resync for cluster node failure
authorGoldwyn Rodrigues <rgoldwyn@suse.com>
Sat, 7 Jun 2014 05:52:29 +0000 (00:52 -0500)
committerGoldwyn Rodrigues <rgoldwyn@suse.com>
Mon, 23 Feb 2015 15:59:06 +0000 (09:59 -0600)
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

index 1f82d0d731ae2bb4144f553d7617d9addb6f818d..d2987130be349a8cc95d06b285cccdde1373c3cb 100644 (file)
@@ -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);
This page took 0.024911 seconds and 5 git commands to generate.