From e23d2d0187abad36bdebaadc03432a2b8d2ab296 Mon Sep 17 00:00:00 2001 From: Pawel Jakub Dawidek Date: Fri, 27 Aug 2010 14:10:25 +0000 Subject: [PATCH] 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 --- sbin/hastd/primary.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sbin/hastd/primary.c b/sbin/hastd/primary.c index 429e914aa4ae..8f96804406bf 100644 --- a/sbin/hastd/primary.c +++ b/sbin/hastd/primary.c @@ -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);