Correct when we log interrupted synchronization.

MFC after:	2 weeks
Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com
This commit is contained in:
Pawel Jakub Dawidek 2010-08-27 21:20:32 +00:00
parent eba09893fd
commit b9cf0cf5fa
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=211897

View File

@ -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;