aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid10.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/raid10.c')
-rw-r--r--drivers/md/raid10.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 82249a69014f..9eb66c1b523b 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -1867,6 +1867,7 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i
1867 int d = r10_bio->devs[i].devnum; 1867 int d = r10_bio->devs[i].devnum;
1868 bio = r10_bio->devs[i].bio; 1868 bio = r10_bio->devs[i].bio;
1869 bio->bi_end_io = NULL; 1869 bio->bi_end_io = NULL;
1870 clear_bit(BIO_UPTODATE, &bio->bi_flags);
1870 if (conf->mirrors[d].rdev == NULL || 1871 if (conf->mirrors[d].rdev == NULL ||
1871 test_bit(Faulty, &conf->mirrors[d].rdev->flags)) 1872 test_bit(Faulty, &conf->mirrors[d].rdev->flags))
1872 continue; 1873 continue;
@@ -2037,6 +2038,11 @@ static int run(mddev_t *mddev)
2037 /* 'size' is now the number of chunks in the array */ 2038 /* 'size' is now the number of chunks in the array */
2038 /* calculate "used chunks per device" in 'stride' */ 2039 /* calculate "used chunks per device" in 'stride' */
2039 stride = size * conf->copies; 2040 stride = size * conf->copies;
2041
2042 /* We need to round up when dividing by raid_disks to
2043 * get the stride size.
2044 */
2045 stride += conf->raid_disks - 1;
2040 sector_div(stride, conf->raid_disks); 2046 sector_div(stride, conf->raid_disks);
2041 mddev->size = stride << (conf->chunk_shift-1); 2047 mddev->size = stride << (conf->chunk_shift-1);
2042 2048