add header! brassow This patch adds the ability detect read failures during recovery and flag the device as failed. We add a call to fail_mirror() when 'read_err' is set upon recovery completion. This sets the error_count on the device. It maintains backwards compatibility (does nothing) if the DM_RAID1_HANDLE_ERRORS flag is not set during mirror device creation. Using the same code put in place to handle write failures, it ensures that the region is marked as 'not-in-sync' and that this is reflected in the log. Signed-off-by: Jonathan Brassow --- drivers/md/dm-raid1.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Index: linux-2.6.23/drivers/md/dm-raid1.c =================================================================== --- linux-2.6.23.orig/drivers/md/dm-raid1.c 2007-10-13 06:49:00.000000000 +0100 +++ linux-2.6.23/drivers/md/dm-raid1.c 2007-10-13 06:49:01.000000000 +0100 @@ -719,8 +719,10 @@ static void recovery_complete(int read_e unsigned m; int bit = 0; - if (read_err) + if (read_err) { DMERR_LIMIT("Unable to read primary mirror during recovery"); + fail_mirror(ms->default_mirror); + } if (!write_err) goto out;