md/raid1: try fix_sync_read_error before process_checks.
authorNeilBrown <neilb@suse.de>
Wed, 11 May 2011 04:50:37 +0000 (14:50 +1000)
committerNeilBrown <neilb@suse.de>
Wed, 11 May 2011 04:50:37 +0000 (14:50 +1000)
commit7ca78d57d11a91bc93b35342fa58647b85bedeb1
tree398f2f91e5252b45872506763ae3677e1f35c026
parent78d7f5f726deb562a51126603f2dc5d00990b223
md/raid1: try fix_sync_read_error before process_checks.

If we get a read error during resync/recovery we current repeat with
single-page reads to find out just where the error is, and possibly
read each page from a different device.

With check/repair we don't currently do that, we just fail.
However it is possible that while all devices fail on the large 64K
read, we might be able to satisfy each 4K from one device or another.

So call fix_sync_read_error before process_checks to maximise the
chance of finding good data and writing it out to the devices with
read errors.

For this to work, we need to set the 'uptodate' flags properly after
fix_sync_read_error has succeeded.

Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid1.c