svn commit: r211897 - head/sbin/hastd
Pawel Jakub Dawidek
pjd at FreeBSD.org
Fri Aug 27 21:20:32 UTC 2010
Author: pjd
Date: Fri Aug 27 21:20:32 2010
New Revision: 211897
URL: http://svn.freebsd.org/changeset/base/211897
Log:
Correct when we log interrupted synchronization.
MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com
Modified:
head/sbin/hastd/primary.c
Modified: head/sbin/hastd/primary.c
==============================================================================
--- head/sbin/hastd/primary.c Fri Aug 27 20:49:06 2010 (r211896)
+++ head/sbin/hastd/primary.c Fri Aug 27 21:20:32 2010 (r211897)
@@ -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;
More information about the svn-src-head
mailing list