diff options
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r-- | drivers/md/raid1.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 57d6abd497ef..d3d3568b4fb1 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -46,6 +46,20 @@ | |||
46 | */ | 46 | */ |
47 | #define NR_RAID1_BIOS 256 | 47 | #define NR_RAID1_BIOS 256 |
48 | 48 | ||
49 | /* when we get a read error on a read-only array, we redirect to another | ||
50 | * device without failing the first device, or trying to over-write to | ||
51 | * correct the read error. To keep track of bad blocks on a per-bio | ||
52 | * level, we store IO_BLOCKED in the appropriate 'bios' pointer | ||
53 | */ | ||
54 | #define IO_BLOCKED ((struct bio *)1) | ||
55 | /* When we successfully write to a known bad-block, we need to remove the | ||
56 | * bad-block marking which must be done from process context. So we record | ||
57 | * the success by setting devs[n].bio to IO_MADE_GOOD | ||
58 | */ | ||
59 | #define IO_MADE_GOOD ((struct bio *)2) | ||
60 | |||
61 | #define BIO_SPECIAL(bio) ((unsigned long)bio <= 2) | ||
62 | |||
49 | /* When there are this many requests queue to be written by | 63 | /* When there are this many requests queue to be written by |
50 | * the raid1 thread, we become 'congested' to provide back-pressure | 64 | * the raid1 thread, we become 'congested' to provide back-pressure |
51 | * for writeback. | 65 | * for writeback. |