Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Aug 2010 14:10:25 +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: r211880 - head/sbin/hastd
Message-ID:  <201008271410.o7REAP8T080267@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pjd
Date: Fri Aug 27 14:10:25 2010
New Revision: 211880
URL: http://svn.freebsd.org/changeset/base/211880

Log:
  Don't increase number synchronized bytes in case of an error.
  
  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 14:08:10 2010	(r211879)
+++ head/sbin/hastd/primary.c	Fri Aug 27 14:10:25 2010	(r211880)
@@ -1699,15 +1699,14 @@ sync_thread(void *arg __unused)
 			    strerror(hio->hio_errors[ncomp]));
 			goto free_queue;
 		}
+
+		synced += length;
 free_queue:
 		mtx_lock(&range_lock);
 		rangelock_del(range_sync, offset, length);
 		if (range_regular_wait)
 			cv_signal(&range_regular_cond);
 		mtx_unlock(&range_lock);
-
-		synced += length;
-
 		pjdlog_debug(2, "sync: (%p) Moving request to the free queue.",
 		    hio);
 		QUEUE_INSERT2(hio, free);



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