diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/raid10.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 37801d68a4cd..a5ecea2672b5 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c | |||
@@ -1594,10 +1594,15 @@ static void fix_read_error(conf_t *conf, mddev_t *mddev, r10bio_t *r10_bio) | |||
1594 | 1594 | ||
1595 | rcu_read_lock(); | 1595 | rcu_read_lock(); |
1596 | do { | 1596 | do { |
1597 | sector_t first_bad; | ||
1598 | int bad_sectors; | ||
1599 | |||
1597 | d = r10_bio->devs[sl].devnum; | 1600 | d = r10_bio->devs[sl].devnum; |
1598 | rdev = rcu_dereference(conf->mirrors[d].rdev); | 1601 | rdev = rcu_dereference(conf->mirrors[d].rdev); |
1599 | if (rdev && | 1602 | if (rdev && |
1600 | test_bit(In_sync, &rdev->flags)) { | 1603 | test_bit(In_sync, &rdev->flags) && |
1604 | is_badblock(rdev, r10_bio->devs[sl].addr + sect, s, | ||
1605 | &first_bad, &bad_sectors) == 0) { | ||
1601 | atomic_inc(&rdev->nr_pending); | 1606 | atomic_inc(&rdev->nr_pending); |
1602 | rcu_read_unlock(); | 1607 | rcu_read_unlock(); |
1603 | success = sync_page_io(rdev, | 1608 | success = sync_page_io(rdev, |