aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-07-26 21:00:36 -0400
committerNeilBrown <neilb@suse.de>2011-07-26 21:00:36 -0400
commit5389042ffa36976caa45a79af16081d759001fa7 (patch)
treeeb303de141a50f41ccac438e734b65dbfe25825e /drivers/md/md.h
parenta478a069b6adf186373a6648c54fc5f1d3c2f8eb (diff)
md: change managed of recovery_disabled.
If we hit a read error while recovering a mirror, we want to abort the recovery without necessarily failing the disk - as having a disk this a read error is better than not having an array at all. Currently this is managed with a per-array flag "recovery_disabled" and is only implemented for RAID1. For RAID10 we will need finer grained control as we might want to disable recovery for individual devices separately. So push more of the decision making into the personality. 'recovery_disabled' is now a 'cookie' which is copied when the personality want to disable recovery and is changed when a device is added to the array as this is used as a trigger to 'try recovery again'. This will allow RAID10 to get the control that it needs. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.h')
-rw-r--r--drivers/md/md.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/md/md.h b/drivers/md/md.h
index 6863f722cd2a..de5455d30d41 100644
--- a/drivers/md/md.h
+++ b/drivers/md/md.h
@@ -239,9 +239,12 @@ struct mddev_s
239#define MD_RECOVERY_FROZEN 9 239#define MD_RECOVERY_FROZEN 9
240 240
241 unsigned long recovery; 241 unsigned long recovery;
242 int recovery_disabled; /* if we detect that recovery 242 /* If a RAID personality determines that recovery (of a particular
243 * will always fail, set this 243 * device) will fail due to a read error on the source device, it
244 * so we don't loop trying */ 244 * takes a copy of this number and does not attempt recovery again
245 * until this number changes.
246 */
247 int recovery_disabled;
245 248
246 int in_sync; /* know to not need resync */ 249 int in_sync; /* know to not need resync */
247 /* 'open_mutex' avoids races between 'md_open' and 'do_md_stop', so 250 /* 'open_mutex' avoids races between 'md_open' and 'do_md_stop', so