diff options
author | NeilBrown <neilb@suse.de> | 2011-07-28 03:39:23 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-07-28 03:39:23 +0200 |
commit | 856e08e23762dfb92ffc68fd0a8d228f9e152160 (patch) | |
tree | fa9977a39da542eebb2129712703c11009a56ff2 /drivers/md/raid10.h | |
parent | md/raid10: Split handle_read_error out from raid10d. (diff) | |
download | linux-856e08e23762dfb92ffc68fd0a8d228f9e152160.tar.xz linux-856e08e23762dfb92ffc68fd0a8d228f9e152160.zip |
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 '')
-rw-r--r-- | drivers/md/raid10.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/md/raid10.h b/drivers/md/raid10.h index a485914c48c1..c646152ba4e4 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 |