md: allow a maximum extent to be set for resyncing
This allows userspace to control resync/reshape progress and synchronise it with other activities, such as shared access in a SAN, or backing up critical sections during a tricky reshape. Writing a number of sectors (which must be a multiple of the chunk size if such is meaningful) causes a resync to pause when it gets to that point. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
c303da6d71
commit
c620727779
@@ -1657,6 +1657,9 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i
|
||||
return (max_sector - sector_nr) + sectors_skipped;
|
||||
}
|
||||
|
||||
if (max_sector > mddev->resync_max)
|
||||
max_sector = mddev->resync_max; /* Don't do IO beyond here */
|
||||
|
||||
/* make sure whole request will fit in a chunk - if chunks
|
||||
* are meaningful
|
||||
*/
|
||||
|
Reference in New Issue
Block a user