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>
Showing
- drivers/md/bitmap.c 2 additions, 2 deletionsdrivers/md/bitmap.c
- drivers/md/bitmap.h 1 addition, 1 deletiondrivers/md/bitmap.h
- drivers/md/md-cluster.c 5 additions, 36 deletionsdrivers/md/md-cluster.c
- drivers/md/md-cluster.h 1 addition, 3 deletionsdrivers/md/md-cluster.h
- drivers/md/md.c 0 additions, 8 deletionsdrivers/md/md.c
- drivers/md/raid1.c 25 additions, 1 deletiondrivers/md/raid1.c
- drivers/md/raid1.h 7 additions, 0 deletionsdrivers/md/raid1.h
- drivers/md/raid10.c 1 addition, 1 deletiondrivers/md/raid10.c
- drivers/md/raid5.c 1 addition, 1 deletiondrivers/md/raid5.c
Loading
Please register or sign in to comment