diff options
Diffstat (limited to 'drivers/md/raid10.c')
-rw-r--r-- | drivers/md/raid10.c | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index d9e28a65af58..670449f7411f 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c | |||
@@ -1488,6 +1488,7 @@ static void fix_read_error(conf_t *conf, mddev_t *mddev, r10bio_t *r10_bio) | |||
1488 | /* write it back and re-read */ | 1488 | /* write it back and re-read */ |
1489 | rcu_read_lock(); | 1489 | rcu_read_lock(); |
1490 | while (sl != r10_bio->read_slot) { | 1490 | while (sl != r10_bio->read_slot) { |
1491 | char b[BDEVNAME_SIZE]; | ||
1491 | int d; | 1492 | int d; |
1492 | if (sl==0) | 1493 | if (sl==0) |
1493 | sl = conf->copies; | 1494 | sl = conf->copies; |
@@ -1503,9 +1504,21 @@ static void fix_read_error(conf_t *conf, mddev_t *mddev, r10bio_t *r10_bio) | |||
1503 | r10_bio->devs[sl].addr + | 1504 | r10_bio->devs[sl].addr + |
1504 | sect + rdev->data_offset, | 1505 | sect + rdev->data_offset, |
1505 | s<<9, conf->tmppage, WRITE) | 1506 | s<<9, conf->tmppage, WRITE) |
1506 | == 0) | 1507 | == 0) { |
1507 | /* Well, this device is dead */ | 1508 | /* Well, this device is dead */ |
1509 | printk(KERN_NOTICE | ||
1510 | "raid10:%s: read correction " | ||
1511 | "write failed" | ||
1512 | " (%d sectors at %llu on %s)\n", | ||
1513 | mdname(mddev), s, | ||
1514 | (unsigned long long)(sect+ | ||
1515 | rdev->data_offset), | ||
1516 | bdevname(rdev->bdev, b)); | ||
1517 | printk(KERN_NOTICE "raid10:%s: failing " | ||
1518 | "drive\n", | ||
1519 | bdevname(rdev->bdev, b)); | ||
1508 | md_error(mddev, rdev); | 1520 | md_error(mddev, rdev); |
1521 | } | ||
1509 | rdev_dec_pending(rdev, mddev); | 1522 | rdev_dec_pending(rdev, mddev); |
1510 | rcu_read_lock(); | 1523 | rcu_read_lock(); |
1511 | } | 1524 | } |
@@ -1526,10 +1539,22 @@ static void fix_read_error(conf_t *conf, mddev_t *mddev, r10bio_t *r10_bio) | |||
1526 | if (sync_page_io(rdev->bdev, | 1539 | if (sync_page_io(rdev->bdev, |
1527 | r10_bio->devs[sl].addr + | 1540 | r10_bio->devs[sl].addr + |
1528 | sect + rdev->data_offset, | 1541 | sect + rdev->data_offset, |
1529 | s<<9, conf->tmppage, READ) == 0) | 1542 | s<<9, conf->tmppage, |
1543 | READ) == 0) { | ||
1530 | /* Well, this device is dead */ | 1544 | /* Well, this device is dead */ |
1545 | printk(KERN_NOTICE | ||
1546 | "raid10:%s: unable to read back " | ||
1547 | "corrected sectors" | ||
1548 | " (%d sectors at %llu on %s)\n", | ||
1549 | mdname(mddev), s, | ||
1550 | (unsigned long long)(sect+ | ||
1551 | rdev->data_offset), | ||
1552 | bdevname(rdev->bdev, b)); | ||
1553 | printk(KERN_NOTICE "raid10:%s: failing drive\n", | ||
1554 | bdevname(rdev->bdev, b)); | ||
1555 | |||
1531 | md_error(mddev, rdev); | 1556 | md_error(mddev, rdev); |
1532 | else | 1557 | } else { |
1533 | printk(KERN_INFO | 1558 | printk(KERN_INFO |
1534 | "raid10:%s: read error corrected" | 1559 | "raid10:%s: read error corrected" |
1535 | " (%d sectors at %llu on %s)\n", | 1560 | " (%d sectors at %llu on %s)\n", |
@@ -1537,6 +1562,7 @@ static void fix_read_error(conf_t *conf, mddev_t *mddev, r10bio_t *r10_bio) | |||
1537 | (unsigned long long)(sect+ | 1562 | (unsigned long long)(sect+ |
1538 | rdev->data_offset), | 1563 | rdev->data_offset), |
1539 | bdevname(rdev->bdev, b)); | 1564 | bdevname(rdev->bdev, b)); |
1565 | } | ||
1540 | 1566 | ||
1541 | rdev_dec_pending(rdev, mddev); | 1567 | rdev_dec_pending(rdev, mddev); |
1542 | rcu_read_lock(); | 1568 | rcu_read_lock(); |