diff options
Diffstat (limited to 'drivers/md/raid10.c')
-rw-r--r-- | drivers/md/raid10.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 6736d6dff981..118f89e716ea 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c | |||
@@ -2010,13 +2010,13 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i | |||
2010 | /* There is nowhere to write, so all non-sync | 2010 | /* There is nowhere to write, so all non-sync |
2011 | * drives must be failed, so try the next chunk... | 2011 | * drives must be failed, so try the next chunk... |
2012 | */ | 2012 | */ |
2013 | { | 2013 | if (sector_nr + max_sync < max_sector) |
2014 | sector_t sec = max_sector - sector_nr; | 2014 | max_sector = sector_nr + max_sync; |
2015 | sectors_skipped += sec; | 2015 | |
2016 | sectors_skipped += (max_sector - sector_nr); | ||
2016 | chunks_skipped ++; | 2017 | chunks_skipped ++; |
2017 | sector_nr = max_sector; | 2018 | sector_nr = max_sector; |
2018 | goto skipped; | 2019 | goto skipped; |
2019 | } | ||
2020 | } | 2020 | } |
2021 | 2021 | ||
2022 | static int run(mddev_t *mddev) | 2022 | static int run(mddev_t *mddev) |