From: wessels <> Date: Thu, 9 Mar 2000 11:50:13 +0000 (+0000) Subject: DW: X-Git-Tag: SQUID_3_0_PRE1~2061 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c6844e774df927164cbb6937682bbc29d0df55ab;p=thirdparty%2Fsquid.git DW: - storeMaintainSwapSpace was breaking out of the scan loop if the current space was below the HIGH water mark, but the event is rescheduled at a small interval when space is near the high water mark. Changed the check to use the low water mark instead. --- diff --git a/src/store.cc b/src/store.cc index 6556127e6f..2ebb301bbf 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1,6 +1,6 @@ /* - * $Id: store.cc,v 1.515 2000/03/06 16:23:35 wessels Exp $ + * $Id: store.cc,v 1.516 2000/03/09 04:50:13 wessels Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived @@ -890,7 +890,7 @@ storeMaintainSwapSpace(void *datanotused) if (ndir >= Config.cacheSwap.n_configured) ndir = ndir % Config.cacheSwap.n_configured; sd = &Config.cacheSwap.swapDirs[ndir++]; - if (sd->cur_size < sd->high_size) + if (sd->cur_size < sd->low_size) continue; if (NULL == sd->lru_walker) continue; diff --git a/src/store_dir.cc b/src/store_dir.cc index ad2d9a7889..37ce8bc92b 100644 --- a/src/store_dir.cc +++ b/src/store_dir.cc @@ -1,6 +1,6 @@ /* - * $Id: store_dir.cc,v 1.105 2000/03/06 16:23:35 wessels Exp $ + * $Id: store_dir.cc,v 1.106 2000/03/09 04:50:13 wessels Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -390,8 +390,8 @@ storeDirConfigure(void) Config.Swap.maxSize += SD->max_size; if (NULL == SD->map) SD->map = file_map_create(); - SD->high_size = (int) (((float) SD->max_size * - (float) Config.Swap.highWaterMark) / 100.0); + SD->low_size = (int) (((float) SD->max_size * + (float) Config.Swap.lowWaterMark) / 100.0); } } diff --git a/src/structs.h b/src/structs.h index 479fec2fe8..17dbe0c04e 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1,6 +1,6 @@ /* - * $Id: structs.h,v 1.313 2000/03/06 16:23:36 wessels Exp $ + * $Id: structs.h,v 1.314 2000/03/09 04:50:14 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -1321,7 +1321,7 @@ struct _SwapDir { swapdir_t type; fileMap *map; int cur_size; - int high_size; + int low_size; int max_size; char *path; int index; /* This entry's index into the swapDirs array */