mirror of
https://github.com/genesi/linux-legacy.git
synced 2026-07-08 17:56:11 +00:00
md: revert incorrect fix for read error handling in raid1.
commit d0e260782c3702a009645c3caa02e381dab8798b upstream. commit4706b349fwas a forward port of a fix that was needed for SLES10. But in fact it is not needed in mainline because the earlier commitdd00a99e7afixes the same problem in a better way. Further, this commit introduces a bug in the way it interacts with the automatic read-error-correction. If, after a read error is successfully corrected, the same disk is chosen to re-read - the re-read won't be attempted but an error will be returned instead. After reverting that commit, there is the possibility that a read error on a read-only array (where read errors cannot be corrected as that requires a write) will repeatedly read the same device and continue to get an error. So in the "Array is readonly" case, fail the drive immediately on a read error. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a5aeface58
commit
2a959cfd1e
@@ -1643,11 +1643,12 @@ static void raid1d(mddev_t *mddev)
|
||||
r1_bio->sector,
|
||||
r1_bio->sectors);
|
||||
unfreeze_array(conf);
|
||||
}
|
||||
} else
|
||||
md_error(mddev,
|
||||
conf->mirrors[r1_bio->read_disk].rdev);
|
||||
|
||||
bio = r1_bio->bios[r1_bio->read_disk];
|
||||
if ((disk=read_balance(conf, r1_bio)) == -1 ||
|
||||
disk == r1_bio->read_disk) {
|
||||
if ((disk=read_balance(conf, r1_bio)) == -1) {
|
||||
printk(KERN_ALERT "raid1: %s: unrecoverable I/O"
|
||||
" read error for block %llu\n",
|
||||
bdevname(bio->bi_bdev,b),
|
||||
|
||||
Reference in New Issue
Block a user