Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176094
b: refs/heads/master
c: 67b8dc4
h: refs/heads/master
v: v3
  • Loading branch information
Robert Becker authored and NeilBrown committed Dec 14, 2009
1 parent b88f125 commit 475c947
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ffa23322b1596bb1a115e767d4251b62842adc23
refs/heads/master: 67b8dc4b06b0e97df55fd76e209f34f9a52e820e
32 changes: 29 additions & 3 deletions trunk/drivers/md/raid10.c
Original file line number Diff line number Diff line change
Expand Up @@ -1488,6 +1488,7 @@ static void fix_read_error(conf_t *conf, mddev_t *mddev, r10bio_t *r10_bio)
/* write it back and re-read */
rcu_read_lock();
while (sl != r10_bio->read_slot) {
char b[BDEVNAME_SIZE];
int d;
if (sl==0)
sl = conf->copies;
Expand All @@ -1503,9 +1504,21 @@ static void fix_read_error(conf_t *conf, mddev_t *mddev, r10bio_t *r10_bio)
r10_bio->devs[sl].addr +
sect + rdev->data_offset,
s<<9, conf->tmppage, WRITE)
== 0)
== 0) {
/* Well, this device is dead */
printk(KERN_NOTICE
"raid10:%s: read correction "
"write failed"
" (%d sectors at %llu on %s)\n",
mdname(mddev), s,
(unsigned long long)(sect+
rdev->data_offset),
bdevname(rdev->bdev, b));
printk(KERN_NOTICE "raid10:%s: failing "
"drive\n",
bdevname(rdev->bdev, b));
md_error(mddev, rdev);
}
rdev_dec_pending(rdev, mddev);
rcu_read_lock();
}
Expand All @@ -1526,17 +1539,30 @@ static void fix_read_error(conf_t *conf, mddev_t *mddev, r10bio_t *r10_bio)
if (sync_page_io(rdev->bdev,
r10_bio->devs[sl].addr +
sect + rdev->data_offset,
s<<9, conf->tmppage, READ) == 0)
s<<9, conf->tmppage,
READ) == 0) {
/* Well, this device is dead */
printk(KERN_NOTICE
"raid10:%s: unable to read back "
"corrected sectors"
" (%d sectors at %llu on %s)\n",
mdname(mddev), s,
(unsigned long long)(sect+
rdev->data_offset),
bdevname(rdev->bdev, b));
printk(KERN_NOTICE "raid10:%s: failing drive\n",
bdevname(rdev->bdev, b));

md_error(mddev, rdev);
else
} else {
printk(KERN_INFO
"raid10:%s: read error corrected"
" (%d sectors at %llu on %s)\n",
mdname(mddev), s,
(unsigned long long)(sect+
rdev->data_offset),
bdevname(rdev->bdev, b));
}

rdev_dec_pending(rdev, mddev);
rcu_read_lock();
Expand Down

0 comments on commit 475c947

Please sign in to comment.