summaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorGoldwyn Rodrigues <rgoldwyn@suse.com>2014-06-06 12:35:34 -0500
committerGoldwyn Rodrigues <rgoldwyn@suse.com>2015-02-23 07:30:11 -0600
commit96ae923ab659e37dd5fc1e05ecbf654e2f94bcbe (patch)
tree9a8868524e7dacb26caec999dd2a65884b22893d /drivers/md/md.c
parent54519c5f4b398bcfe599f652b4ef4004d5fa63ff (diff)
downloadop-kernel-dev-96ae923ab659e37dd5fc1e05ecbf654e2f94bcbe.zip
op-kernel-dev-96ae923ab659e37dd5fc1e05ecbf654e2f94bcbe.tar.gz
Gather on-going resync information of other nodes
When a node joins, it does not know of other nodes performing resync. So, each node keeps the resync information in it's LVB. When a new node joins, it reads the LVB of each "online" bitmap. [TODO] The new node attempts to get the PW lock on other bitmap, if it is successful, it reads the bitmap and performs the resync (if required) on it's behalf. If the node does not get the PW, it requests CR and reads the LVB for the resync information. Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 8f310d9..71f6550 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -7626,6 +7626,9 @@ void md_do_sync(struct md_thread *thread)
md_new_event(mddev);
update_time = jiffies;
+ if (mddev_is_clustered(mddev))
+ md_cluster_ops->resync_info_update(mddev, j, max_sectors);
+
blk_start_plug(&plug);
while (j < max_sectors) {
sector_t sectors;
@@ -7686,6 +7689,8 @@ void md_do_sync(struct md_thread *thread)
j += sectors;
if (j > 2)
mddev->curr_resync = j;
+ if (mddev_is_clustered(mddev))
+ md_cluster_ops->resync_info_update(mddev, j, max_sectors);
mddev->curr_mark_cnt = io_sectors;
if (last_check == 0)
/* this is the earliest that rebuild will be
@@ -7746,6 +7751,9 @@ void md_do_sync(struct md_thread *thread)
/* tell personality that we are finished */
mddev->pers->sync_request(mddev, max_sectors, &skipped, 1);
+ if (mddev_is_clustered(mddev))
+ md_cluster_ops->resync_info_update(mddev, 0, 0);
+
if (!test_bit(MD_RECOVERY_CHECK, &mddev->recovery) &&
mddev->curr_resync > 2) {
if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) {
OpenPOWER on IntegriCloud