From: wessels <> Date: Fri, 31 Oct 1997 03:37:56 +0000 (+0000) Subject: During store rebuild, we should only call storeDirUpdateSwapSize() X-Git-Tag: SQUID_3_0_PRE1~4612 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=116ca1e0118ab08bfcfd79b8927344b113931d82;p=thirdparty%2Fsquid.git During store rebuild, we should only call storeDirUpdateSwapSize() if the log file is CLEAN. Otherwise, call it in storeSwapInValidateComplete() --- diff --git a/src/store.cc b/src/store.cc index b802960342..25ed21f23e 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1,6 +1,6 @@ /* - * $Id: store.cc,v 1.328 1997/10/30 00:50:36 wessels Exp $ + * $Id: store.cc,v 1.329 1997/10/30 20:37:56 wessels Exp $ * * DEBUG: section 20 Storeage Manager * AUTHOR: Harvest Derived @@ -718,6 +718,7 @@ storeAddDiskRestore(const char *url, /* Only set the file bit if we know its a valid entry */ /* otherwise, set it in the validation procedure */ storeDirMapBitSet(file_number); + storeDirUpdateSwapSize(e->swap_file_number, size, 1); } else { BIT_CLR(e->flag, ENTRY_VALIDATED); } @@ -1265,7 +1266,6 @@ storeDoRebuildFromDisk(void *data) (void) 0; } /* update store_swap_size */ - storeDirUpdateSwapSize(sfileno, size, 1); RB->objcount++; e = storeAddDiskRestore(url, sfileno, @@ -1397,6 +1397,7 @@ storeValidateComplete(void *data, int retcode, int errcode) } else { BIT_SET(e->flag, ENTRY_VALIDATED); storeDirMapBitSet(e->swap_file_number); + storeDirUpdateSwapSize(e->swap_file_number, e->object_len, 1); } errno = errcode; ctrlp->callback(ctrlp->callback_data);