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.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index e293d92641ac..499620afb44b 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -22,7 +22,6 @@
22#include <linux/blkdev.h> 22#include <linux/blkdev.h>
23#include <linux/seq_file.h> 23#include <linux/seq_file.h>
24#include "md.h" 24#include "md.h"
25#include "dm-bio-list.h"
26#include "raid10.h" 25#include "raid10.h"
27#include "bitmap.h" 26#include "bitmap.h"
28 27
@@ -1810,17 +1809,17 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i
1810 r10_bio->sector = sect; 1809 r10_bio->sector = sect;
1811 1810
1812 raid10_find_phys(conf, r10_bio); 1811 raid10_find_phys(conf, r10_bio);
1813 /* Need to check if this section will still be 1812
1813 /* Need to check if the array will still be
1814 * degraded 1814 * degraded
1815 */ 1815 */
1816 for (j=0; j<conf->copies;j++) { 1816 for (j=0; j<conf->raid_disks; j++)
1817 int d = r10_bio->devs[j].devnum; 1817 if (conf->mirrors[j].rdev == NULL ||
1818 if (conf->mirrors[d].rdev == NULL || 1818 test_bit(Faulty, &conf->mirrors[j].rdev->flags)) {
1819 test_bit(Faulty, &conf->mirrors[d].rdev->flags)) {
1820 still_degraded = 1; 1819 still_degraded = 1;
1821 break; 1820 break;
1822 } 1821 }
1823 } 1822
1824 must_sync = bitmap_start_sync(mddev->bitmap, sect, 1823 must_sync = bitmap_start_sync(mddev->bitmap, sect,
1825 &sync_blocks, still_degraded); 1824 &sync_blocks, still_degraded);
1826 1825