summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorNeilBrown2006-01-06 09:20:23 +0100
committerLinus Torvalds2006-01-06 17:34:04 +0100
commitcf30a473a02901fe4db37abc0b0fa26dd5ba3f72 (patch)
tree3fa967963e174913826943f0f98e63c60032d07d /include
parent[PATCH] md: better handling for read error in raid1 during resync (diff)
downloadkernel-qcow2-linux-cf30a473a02901fe4db37abc0b0fa26dd5ba3f72.tar.gz
kernel-qcow2-linux-cf30a473a02901fe4db37abc0b0fa26dd5ba3f72.tar.xz
kernel-qcow2-linux-cf30a473a02901fe4db37abc0b0fa26dd5ba3f72.zip
[PATCH] md: handle errors when read-only
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')
-rw-r--r--include/linux/raid/raid1.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/raid/raid1.h b/include/linux/raid/raid1.h
index cbe4238d3f9f..9d5494aaac0f 100644
--- a/include/linux/raid/raid1.h
+++ b/include/linux/raid/raid1.h
@@ -109,6 +109,13 @@ struct r1bio_s {
/* DO NOT PUT ANY NEW FIELDS HERE - bios array is contiguously alloced*/
};
+/* when we get a read error on a read-only array, we redirect to another
+ * device without failing the first device, or trying to over-write to
+ * correct the read error. To keep track of bad blocks on a per-bio
+ * level, we store IO_BLOCKED in the appropriate 'bios' pointer
+ */
+#define IO_BLOCKED ((struct bio*)1)
+
/* bits for r1bio.state */
#define R1BIO_Uptodate 0
#define R1BIO_IsSync 1