diff options
author | NeilBrown <neilb@suse.de> | 2005-11-09 00:39:22 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-09 10:56:36 -0500 |
commit | 4e5314b56a7ea11c7a5f2b8418992b2f49648a25 (patch) | |
tree | 58b0c604f4f4e55523d2c93971f79d80e406b9ce /include/linux | |
parent | 703ebe86a999861e833be4015aaf552837e9613a (diff) |
[PATCH] md: better handling of readerrors with raid5.
This patch changes the behaviour of raid5 when it gets a read error.
Instead of just failing the device, it tried to find out what should have
been there, and writes it over the bad block. For some media-errors, this
has a reasonable chance of fixing the error. If the write succeeds, and a
subsequent read succeeds as well, raid5 decided the address is OK and
conitnues.
Instead of failing a drive on read-error, we attempt to re-write the block,
and then re-read. If that all works, we allow the device to remain in the
array.
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/raid/raid5.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/raid/raid5.h b/include/linux/raid/raid5.h index 176fc653c284..f025ba6fb14c 100644 --- a/include/linux/raid/raid5.h +++ b/include/linux/raid/raid5.h | |||
@@ -154,6 +154,8 @@ struct stripe_head { | |||
154 | #define R5_Wantwrite 5 | 154 | #define R5_Wantwrite 5 |
155 | #define R5_Syncio 6 /* this io need to be accounted as resync io */ | 155 | #define R5_Syncio 6 /* this io need to be accounted as resync io */ |
156 | #define R5_Overlap 7 /* There is a pending overlapping request on this block */ | 156 | #define R5_Overlap 7 /* There is a pending overlapping request on this block */ |
157 | #define R5_ReadError 8 /* seen a read error here recently */ | ||
158 | #define R5_ReWrite 9 /* have tried to over-write the readerror */ | ||
157 | 159 | ||
158 | /* | 160 | /* |
159 | * Write method | 161 | * Write method |