summaryrefslogtreecommitdiffstats
path: root/super-ddf.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2008-05-15 16:48:49 +1000
committerNeil Brown <neilb@suse.de>2008-05-15 16:48:49 +1000
commit8d45d1969bc299040201df82c51f7fbbc985c401 (patch)
treeaaa4a6f63d3dd1682388d48f293b892b0d6c0567 /super-ddf.c
parentc2a1e7dad7a2ca88bd6667f8ad0853a62fe8f874 (diff)
downloadmdadm-8d45d1969bc299040201df82c51f7fbbc985c401.tar.gz
mdadm-8d45d1969bc299040201df82c51f7fbbc985c401.tar.xz
mdadm-8d45d1969bc299040201df82c51f7fbbc985c401.zip
handle disk failures
From: Dan Williams <dan.j.williams@intel.com> Added curr_state as a parameter to set_disk. Handlers look at this to record components failures, and set global 'degraded' or 'failed' status. When reading the state as faulty: 1/ mark the disk failed in the metadata 2/ write '-blocked' to the rdev state to allow the kernel's failure mechanism to advance 3/ the kernel will take away the drive's role in remove_and_add_spares() 4/ once the disk no longer has a role writing 'remove' to the rdev state will get the disk out of array. There is a window after writing '-blocked' where the kernel will return -EBUSY to remove requests. We rely on the fact that the disk will continue to show faulty so we lazily wait until the kernel is ready to remove the disk. If the manager thread needs to get the disk out of the way it can ping the monitor and wait, just like the replace_array() case. [buglet fix: swap the parameters of attr_match in read_dev_state] Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'super-ddf.c')
-rw-r--r--super-ddf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/super-ddf.c b/super-ddf.c
index 816a975..10647f3 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -2464,7 +2464,7 @@ static void ddf_mark_sync(struct active_array *a, unsigned long long resync)
fprintf(stderr, "ddf: mark sync\n");
}
-static void ddf_set_disk(struct active_array *a, int n)
+static void ddf_set_disk(struct active_array *a, int n, int state)
{
fprintf(stderr, "ddf: set_disk %d\n", n);
}