summaryrefslogtreecommitdiffstats
path: root/managemon.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2008-05-27 09:18:53 +1000
committerNeil Brown <neilb@suse.de>2008-05-27 09:18:53 +1000
commit77402e51054701cd02ff07f8d5d43ef23e640226 (patch)
tree9f76dbf1688ce36341ef023d33649a51bb5b176f /managemon.c
parent75aa18b53cb2df342bc78dd9e44cd0f0c51075f0 (diff)
downloadmdadm-77402e51054701cd02ff07f8d5d43ef23e640226.tar.gz
mdadm-77402e51054701cd02ff07f8d5d43ef23e640226.tar.xz
mdadm-77402e51054701cd02ff07f8d5d43ef23e640226.zip
Discard get_sync_pos. We should be using get_resync_start.
"sync_complete" just tracks the current resync/recover/check/whatever pass. "resync_start" tracks which parts of the array are known to be in-sync (modulo active writes). So it is what we need to use to update the metadata. Also we cannot call it when the array has stopped, as the value is no longer available then. We must call it when the resync completes. Possibly also call it preiodically if the array is quiescent.
Diffstat (limited to 'managemon.c')
-rw-r--r--managemon.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/managemon.c b/managemon.c
index 971dcd1..91755f9 100644
--- a/managemon.c
+++ b/managemon.c
@@ -87,7 +87,6 @@ static void close_aa(struct active_array *aa)
close(aa->action_fd);
close(aa->info.state_fd);
close(aa->resync_start_fd);
- close(aa->sync_pos_fd);
}
static void free_aa(struct active_array *aa)
@@ -265,8 +264,7 @@ static void manage_new(struct mdstat_ent *mdstat,
new->action_fd = sysfs_open(new->devnum, NULL, "sync_action");
new->info.state_fd = sysfs_open(new->devnum, NULL, "array_state");
new->resync_start_fd = sysfs_open(new->devnum, NULL, "resync_start");
- new->sync_pos_fd = sysfs_open(new->devnum, NULL, "sync_completed");
- new->sync_pos = 0;
+ new->resync_start = 0;
sysfs_free(mdi);
// finds and compares.