summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sbin/hastd/primary.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sbin/hastd/primary.c b/sbin/hastd/primary.c
index 2d8a0e4..c495f10 100644
--- a/sbin/hastd/primary.c
+++ b/sbin/hastd/primary.c
@@ -1507,18 +1507,16 @@ sync_thread(void *arg __unused)
ncomps = HAST_NCOMPONENTS;
dorewind = true;
- synced = -1;
+ synced = 0;
+ offset = -1;
for (;;) {
mtx_lock(&sync_lock);
- if (synced == -1)
- synced = 0;
- else if (!sync_inprogress) {
+ if (offset >= 0 && !sync_inprogress) {
pjdlog_info("Synchronization interrupted. "
"%jd bytes synchronized so far.",
(intmax_t)synced);
- hook_exec(res->hr_exec, "syncintr",
- res->hr_name, NULL);
+ hook_exec(res->hr_exec, "syncintr", res->hr_name, NULL);
}
while (!sync_inprogress) {
dorewind = true;
OpenPOWER on IntegriCloud