|
@@ -2890,6 +2890,12 @@ static sector_t sync_request(struct mddev *mddev, sector_t sector_nr,
|
|
|
/* want to reconstruct this device */
|
|
|
rb2 = r10_bio;
|
|
|
sect = raid10_find_virt(conf, sector_nr, i);
|
|
|
+ if (sect >= mddev->resync_max_sectors) {
|
|
|
+ /* last stripe is not complete - don't
|
|
|
+ * try to recover this sector.
|
|
|
+ */
|
|
|
+ continue;
|
|
|
+ }
|
|
|
/* Unless we are doing a full sync, or a replacement
|
|
|
* we only need to recover the block if it is set in
|
|
|
* the bitmap
|