diff options
author | NeilBrown <neilb@suse.de> | 2011-07-27 05:00:36 +0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-07-27 05:00:36 +0400 |
commit | 5389042ffa36976caa45a79af16081d759001fa7 (patch) | |
tree | eb303de141a50f41ccac438e734b65dbfe25825e /drivers/md/raid1.h | |
parent | a478a069b6adf186373a6648c54fc5f1d3c2f8eb (diff) | |
download | linux-5389042ffa36976caa45a79af16081d759001fa7.tar.xz |
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/raid1.h')
-rw-r--r-- | drivers/md/raid1.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/md/raid1.h b/drivers/md/raid1.h index e743a64fac4f..3cd18cfda2ad 100644 --- a/drivers/md/raid1.h +++ b/drivers/md/raid1.h @@ -48,6 +48,12 @@ struct r1_private_data_s { * (fresh device added). * Cleared when a sync completes. */ + int recovery_disabled; /* when the same as + * mddev->recovery_disabled + * we don't allow recovery + * to be attempted as we + * expect a read error + */ wait_queue_head_t wait_barrier; |