Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Aug 2010 21:20:32 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r211897 - head/sbin/hastd
Message-ID:  <201008272120.o7RLKWIP007859@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008272120.o7RLKWIP007859>