summaryrefslogtreecommitdiffstats
path: root/drivers/md/raid10.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-07-28 11:39:23 +1000
committerNeilBrown <neilb@suse.de>2011-07-28 11:39:23 +1000
commit856e08e23762dfb92ffc68fd0a8d228f9e152160 (patch)
treefa9977a39da542eebb2129712703c11009a56ff2 /drivers/md/raid10.h
parent560f8e5532d63a314271bfb99d3d1d53c938ed14 (diff)
md/raid10: avoid reading from known bad blocks - part 1
This patch just covers the basic read path: 1/ read_balance needs to check for badblocks, and return not only the chosen slot, but also how many good blocks are available there. 2/ read submission must be ready to issue multiple reads to different devices as different bad blocks on different devices could mean that a single large read cannot be served by any one device, but can still be served by the array. This requires keeping count of the number of outstanding requests per bio. This count is stored in 'bi_phys_segments' On read error we currently just fail the request if another target cannot handle the whole request. Next patch refines that a bit. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid10.h')
-rw-r--r--drivers/md/raid10.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/md/raid10.h b/drivers/md/raid10.h
index a485914c48c..c646152ba4e 100644
--- a/drivers/md/raid10.h
+++ b/drivers/md/raid10.h
@@ -124,4 +124,8 @@ struct r10bio_s {
#define R10BIO_IsSync 1
#define R10BIO_IsRecover 2
#define R10BIO_Degraded 3
+/* Set ReadError on bios that experience a read error
+ * so that raid10d knows what to do with them.
+ */
+#define R10BIO_ReadError 4
#endif