]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
DW:
authorwessels <>
Thu, 9 Mar 2000 11:50:13 +0000 (11:50 +0000)
committerwessels <>
Thu, 9 Mar 2000 11:50:13 +0000 (11:50 +0000)
 - 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.

src/store.cc
src/store_dir.cc
src/structs.h

index 6556127e6ff99b736cfcb72d9445061354671f95..2ebb301bbf9ff421a90eb1e9c03291b071888df9 100644 (file)
@@ -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;
index ad2d9a7889f434e2593f0eed8e3f50ab93a35bcb..37ce8bc92bef9b47437050fcf4d3dfdd77798f77 100644 (file)
@@ -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);
     }
 }
 
index 479fec2fe876536adfcc48677544b1692e5e9dc7..17dbe0c04e17ca6a3e831c663d02018fdb2f3fe1 100644 (file)
@@ -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 */