|
@@ -881,8 +881,7 @@ static sector_t wait_barrier(struct r1conf *conf, struct bio *bio)
|
|
}
|
|
}
|
|
|
|
|
|
if (bio && bio_data_dir(bio) == WRITE) {
|
|
if (bio && bio_data_dir(bio) == WRITE) {
|
|
- if (bio->bi_iter.bi_sector >=
|
|
|
|
- conf->mddev->curr_resync_completed) {
|
|
|
|
|
|
+ if (bio->bi_iter.bi_sector >= conf->next_resync) {
|
|
if (conf->start_next_window == MaxSector)
|
|
if (conf->start_next_window == MaxSector)
|
|
conf->start_next_window =
|
|
conf->start_next_window =
|
|
conf->next_resync +
|
|
conf->next_resync +
|
|
@@ -1516,7 +1515,7 @@ static void close_sync(struct r1conf *conf)
|
|
conf->r1buf_pool = NULL;
|
|
conf->r1buf_pool = NULL;
|
|
|
|
|
|
spin_lock_irq(&conf->resync_lock);
|
|
spin_lock_irq(&conf->resync_lock);
|
|
- conf->next_resync = 0;
|
|
|
|
|
|
+ conf->next_resync = MaxSector - 2 * NEXT_NORMALIO_DISTANCE;
|
|
conf->start_next_window = MaxSector;
|
|
conf->start_next_window = MaxSector;
|
|
conf->current_window_requests +=
|
|
conf->current_window_requests +=
|
|
conf->next_window_requests;
|
|
conf->next_window_requests;
|