summaryrefslogtreecommitdiff
path: root/drivers/md/raid10.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-07-27 05:00:36 +0400
committerNeilBrown <neilb@suse.de>2011-07-27 05:00:36 +0400
commit2bb77736ae5dca0a189829fbb7379d43364a9dac (patch)
treea15efb6810aaf67af679bd05edb5419ac9f19583 /drivers/md/raid10.h
parent5389042ffa36976caa45a79af16081d759001fa7 (diff)
downloadlinux-2bb77736ae5dca0a189829fbb7379d43364a9dac.tar.xz
md/raid10: Make use of new recovery_disabled handling
When we get a read error during recovery, RAID10 previously arranged for the recovering device to appear to fail so that the recovery stops and doesn't restart. This is misleading and wrong. Instead, make use of the new recovery_disabled handling and mark the target device and having recovery disabled. Add appropriate checks in add_disk and remove_disk so that devices are removed and not re-added when recovery is disabled. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid10.h')
-rw-r--r--drivers/md/raid10.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/md/raid10.h b/drivers/md/raid10.h
index 944b1104d3b4..a485914c48c1 100644
--- a/drivers/md/raid10.h
+++ b/drivers/md/raid10.h
@@ -6,6 +6,11 @@ typedef struct mirror_info mirror_info_t;
struct mirror_info {
mdk_rdev_t *rdev;
sector_t head_position;
+ int recovery_disabled; /* matches
+ * mddev->recovery_disabled
+ * when we shouldn't try
+ * recovering this device.
+ */
};
typedef struct r10bio_s r10bio_t;