diff options
author | NeilBrown <neilb@suse.de> | 2011-07-28 11:39:24 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-07-28 11:39:24 +1000 |
commit | 749c55e942d91cb27045fe2eb313aa5afe68ae0b (patch) | |
tree | ddf80a1eb3ef9005bc209c1c4946916b89c22a33 /drivers/md/raid10.h | |
parent | d4432c23be957ff061f7b23fd60e8506cb472a55 (diff) | |
download | op-kernel-dev-749c55e942d91cb27045fe2eb313aa5afe68ae0b.zip op-kernel-dev-749c55e942d91cb27045fe2eb313aa5afe68ae0b.tar.gz |
md/raid10: clear bad-block record when write succeeds.
If we succeed in writing to a block that was recorded as
being bad, we clear the bad-block record.
This requires some delayed handling as the bad-block-list update has
to happen in process-context.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid10.h')
-rw-r--r-- | drivers/md/raid10.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/md/raid10.h b/drivers/md/raid10.h index c646152..d8b7f9a 100644 --- a/drivers/md/raid10.h +++ b/drivers/md/raid10.h @@ -118,6 +118,13 @@ struct r10bio_s { * level, we store IO_BLOCKED in the appropriate 'bios' pointer */ #define IO_BLOCKED ((struct bio*)1) +/* When we successfully write to a known bad-block, we need to remove the + * bad-block marking which must be done from process context. So we record + * the success by setting devs[n].bio to IO_MADE_GOOD + */ +#define IO_MADE_GOOD ((struct bio *)2) + +#define BIO_SPECIAL(bio) ((unsigned long)bio <= 2) /* bits for r10bio.state */ #define R10BIO_Uptodate 0 @@ -128,4 +135,8 @@ struct r10bio_s { * so that raid10d knows what to do with them. */ #define R10BIO_ReadError 4 +/* If a write for this request means we can clear some + * known-bad-block records, we set this flag. + */ +#define R10BIO_MadeGood 5 #endif |