@@ -2835,7 +2835,7 @@ static sector_t raid1_sync_request(struct mddev *mddev, sector_t sector_nr,
nr_sectors += len>>9;
sector_nr += len>>9;
sync_blocks -= (len>>9);
- } while (r1_bio->bios[disk]->bi_vcnt < RESYNC_PAGES);
+ } while (r1_bio->bios[disk]->bi_error < RESYNC_PAGES);
bio_full:
/* return .bi_error back to bio */
for (i = 0 ; i < conf->raid_disks * 2; i++) {
@@ -3453,7 +3453,7 @@ static sector_t raid10_sync_request(struct mddev *mddev, sector_t sector_nr,
}
nr_sectors += len>>9;
sector_nr += len>>9;
- } while (biolist->bi_vcnt < RESYNC_PAGES);
+ } while (biolist->bi_error < RESYNC_PAGES);
bio_full:
/* return .bi_error back to bio, and set resync's as -EIO */
for (bio= biolist ; bio ; bio=bio->bi_next)
Instead we use the index of the pre-allocated pages buffer, it should be more explicit because the index(.bi_error) just means how many pages are added to the bio. Signed-off-by: Ming Lei <tom.leiming@gmail.com> --- drivers/md/raid1.c | 2 +- drivers/md/raid10.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)