Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

md: revert incorrect fix for read error handling in raid1.

commit 4706b349f was a forward port of a fix that was needed
for SLES10. But in fact it is not needed in mainline because
the earlier commit dd00a99e7a fixes 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>
Cc: stable@kernel.org

NeilBrown d0e26078 a9366e61

+4 -3
+4 -3
drivers/md/raid1.c
··· 1650 1650 r1_bio->sector, 1651 1651 r1_bio->sectors); 1652 1652 unfreeze_array(conf); 1653 - } 1653 + } else 1654 + md_error(mddev, 1655 + conf->mirrors[r1_bio->read_disk].rdev); 1654 1656 1655 1657 bio = r1_bio->bios[r1_bio->read_disk]; 1656 - if ((disk=read_balance(conf, r1_bio)) == -1 || 1657 - disk == r1_bio->read_disk) { 1658 + if ((disk=read_balance(conf, r1_bio)) == -1) { 1658 1659 printk(KERN_ALERT "raid1: %s: unrecoverable I/O" 1659 1660 " read error for block %llu\n", 1660 1661 bdevname(bio->bi_bdev,b),