diff options
author | pjd <pjd@FreeBSD.org> | 2010-08-27 21:20:32 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2010-08-27 21:20:32 +0000 |
commit | ae9ec59c5024a5fee5888ac29ca56d2e34dcfeb5 (patch) | |
tree | f9fe6ebd2d7da28c7d506dbfa59d794664a7125c /sbin | |
parent | e55034b62260e3f8056f2f79cbe0b70e3f8ac9c9 (diff) | |
download | FreeBSD-src-ae9ec59c5024a5fee5888ac29ca56d2e34dcfeb5.zip FreeBSD-src-ae9ec59c5024a5fee5888ac29ca56d2e34dcfeb5.tar.gz |
Correct when we log interrupted synchronization.
MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/hastd/primary.c | 10 |
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; |