summaryrefslogtreecommitdiffstats
path: root/monitor.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2008-05-27 01:18:38 +0200
committerNeil Brown <neilb@suse.de>2008-05-27 01:18:38 +0200
commit4e5528c6f7b66f40617dabb232bc6c016bb86204 (patch)
tree2350d3462e587c1a28ea19f2aa908bc368cc3d57 /monitor.c
parentInitialise newly allocated active_array better. (diff)
downloadmdadm-4e5528c6f7b66f40617dabb232bc6c016bb86204.tar.xz
mdadm-4e5528c6f7b66f40617dabb232bc6c016bb86204.zip
Implement mark_clean for ddf and remove mark_dirty and mark_sync
mark_dirty is just a special case of mark_clean - with sync_pos == 0. mark_sync is not required. We don't modify the metadata when sync finishes. Only when the array becomes non-writeable at which point we use mark_clean to record how far the resync progressed.
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/monitor.c b/monitor.c
index 5fbbc833..a630c937 100644
--- a/monitor.c
+++ b/monitor.c
@@ -250,12 +250,12 @@ static int read_and_act(struct active_array *a)
deactivate = 1;
}
if (a->curr_state == write_pending) {
- a->container->ss->mark_dirty(a);
+ a->container->ss->mark_clean(a, 0);
a->next_state = active;
}
if (a->curr_state == active_idle) {
/* Set array to 'clean' FIRST, then
- * a->ss->mark_clean(a);
+ * a->ss->mark_clean(a, ~0ULL);
* just ignore for now.
*/
}
@@ -269,16 +269,18 @@ static int read_and_act(struct active_array *a)
if (a->resync_start == ~0ULL)
a->next_state = read_auto; /* array is clean */
else {
- a->container->ss->mark_dirty(a);
+ a->container->ss->mark_clean(a, 0);
a->next_state = active;
}
}
if (a->curr_action == idle &&
a->prev_action == resync) {
- /* check resync_start to see if it is 'max' */
- get_resync_start(a);
- a->container->ss->mark_sync(a, a->resync_start);
+ /* A resync has finished. The endpoint is recorded in
+ * 'sync_start'. We don't update the metadata
+ * until the array goes inactive or readonly though.
+ * Just check if we need to fiddle spares.
+ */
check_degraded = 1;
}