diff options
author | Goldwyn Rodrigues <rgoldwyn@suse.com> | 2015-08-19 00:14:42 +0200 |
---|---|---|
committer | Goldwyn Rodrigues <rgoldwyn@suse.com> | 2015-10-12 08:32:05 +0200 |
commit | c40f341f1e7fd4eddcfc5881d94cfa8669071ee6 (patch) | |
tree | d8d572cb6b88dcd1102596d31b2bd153f79fdaab /drivers/md/md-cluster.h | |
parent | md: Increment version for clustered bitmaps (diff) | |
download | linux-c40f341f1e7fd4eddcfc5881d94cfa8669071ee6.tar.xz linux-c40f341f1e7fd4eddcfc5881d94cfa8669071ee6.zip |
md-cluster: Use a small window for resync
Suspending the entire device for resync could take too long. Resync
in small chunks.
cluster's resync window (32M) is maintained in r1conf as
cluster_sync_low and cluster_sync_high and processed in
raid1's sync_request(). If the current resync is outside the cluster
resync window:
1. Set the cluster_sync_low to curr_resync_completed.
2. Check if the sync will fit in the new window, if not issue a
wait_barrier() and set cluster_sync_low to sector_nr.
3. Set cluster_sync_high to cluster_sync_low + resync_window.
4. Send a message to all nodes so they may add it in their suspension
list.
bitmap_cond_end_sync is modified to allow to force a sync inorder
to get the curr_resync_completed uptodate with the sector passed.
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md-cluster.h')
-rw-r--r-- | drivers/md/md-cluster.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/md/md-cluster.h b/drivers/md/md-cluster.h index 00defe2badbc..f5bdc0c86eaa 100644 --- a/drivers/md/md-cluster.h +++ b/drivers/md/md-cluster.h @@ -12,9 +12,7 @@ struct md_cluster_operations { int (*join)(struct mddev *mddev, int nodes); int (*leave)(struct mddev *mddev); int (*slot_number)(struct mddev *mddev); - void (*resync_info_update)(struct mddev *mddev, sector_t lo, sector_t hi); - int (*resync_start)(struct mddev *mddev, sector_t lo, sector_t hi); - void (*resync_finish)(struct mddev *mddev); + int (*resync_info_update)(struct mddev *mddev, sector_t lo, sector_t hi); int (*metadata_update_start)(struct mddev *mddev); int (*metadata_update_finish)(struct mddev *mddev); int (*metadata_update_cancel)(struct mddev *mddev); |