diff options
Diffstat (limited to 'drivers/md/md.h')
-rw-r--r-- | drivers/md/md.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/drivers/md/md.h b/drivers/md/md.h index fa4b607854ac..1e586bb4452e 100644 --- a/drivers/md/md.h +++ b/drivers/md/md.h | |||
@@ -81,12 +81,29 @@ struct mdk_rdev_s | |||
81 | #define In_sync 2 /* device is in_sync with rest of array */ | 81 | #define In_sync 2 /* device is in_sync with rest of array */ |
82 | #define WriteMostly 4 /* Avoid reading if at all possible */ | 82 | #define WriteMostly 4 /* Avoid reading if at all possible */ |
83 | #define AutoDetected 7 /* added by auto-detect */ | 83 | #define AutoDetected 7 /* added by auto-detect */ |
84 | #define Blocked 8 /* An error occurred on an externally | 84 | #define Blocked 8 /* An error occurred but has not yet |
85 | * managed array, don't allow writes | 85 | * been acknowledged by the metadata |
86 | * handler, so don't allow writes | ||
86 | * until it is cleared */ | 87 | * until it is cleared */ |
87 | #define WriteErrorSeen 9 /* A write error has been seen on this | 88 | #define WriteErrorSeen 9 /* A write error has been seen on this |
88 | * device | 89 | * device |
89 | */ | 90 | */ |
91 | #define FaultRecorded 10 /* Intermediate state for clearing | ||
92 | * Blocked. The Fault is/will-be | ||
93 | * recorded in the metadata, but that | ||
94 | * metadata hasn't been stored safely | ||
95 | * on disk yet. | ||
96 | */ | ||
97 | #define BlockedBadBlocks 11 /* A writer is blocked because they | ||
98 | * found an unacknowledged bad-block. | ||
99 | * This can safely be cleared at any | ||
100 | * time, and the writer will re-check. | ||
101 | * It may be set at any time, and at | ||
102 | * worst the writer will timeout and | ||
103 | * re-check. So setting it as | ||
104 | * accurately as possible is good, but | ||
105 | * not absolutely critical. | ||
106 | */ | ||
90 | wait_queue_head_t blocked_wait; | 107 | wait_queue_head_t blocked_wait; |
91 | 108 | ||
92 | int desc_nr; /* descriptor index in the superblock */ | 109 | int desc_nr; /* descriptor index in the superblock */ |
@@ -124,6 +141,10 @@ struct mdk_rdev_s | |||
124 | 141 | ||
125 | struct badblocks { | 142 | struct badblocks { |
126 | int count; /* count of bad blocks */ | 143 | int count; /* count of bad blocks */ |
144 | int unacked_exist; /* there probably are unacknowledged | ||
145 | * bad blocks. This is only cleared | ||
146 | * when a read discovers none | ||
147 | */ | ||
127 | int shift; /* shift from sectors to block size | 148 | int shift; /* shift from sectors to block size |
128 | * a -ve shift means badblocks are | 149 | * a -ve shift means badblocks are |
129 | * disabled.*/ | 150 | * disabled.*/ |