]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
storeGetSwapSpace(). Don't increment swap_help if we are actually
authorwessels <>
Mon, 27 Oct 1997 23:33:56 +0000 (23:33 +0000)
committerwessels <>
Mon, 27 Oct 1997 23:33:56 +0000 (23:33 +0000)
deleting objects..

src/store.cc

index ce086a496e93bfa482c58e212871d0515cf02b15..b7e31a06526bc4b4cd01d9a16a07785d30f98778 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store.cc,v 1.316 1997/10/27 05:37:39 wessels Exp $
+ * $Id: store.cc,v 1.317 1997/10/27 16:33:56 wessels Exp $
  *
  * DEBUG: section 20    Storeage Manager
  * AUTHOR: Harvest Derived
@@ -1754,8 +1754,8 @@ storeGetSwapSpace(int size)
     /* free the list */
     safe_free(LRU_list);
 
-    if ((store_swap_size + kb_size > store_swap_high)) {
-       if (++swap_help > SWAP_MAX_HELP) {
+    if (removed == 0 && (store_swap_size + kb_size > store_swap_high)) {
+       if (++swap_help > 1) {
            debug(20, DL) ("WARNING: Repeated failures to free up disk space!\n");
            DL = 1;
        }
@@ -1763,7 +1763,7 @@ storeGetSwapSpace(int size)
        debug(20, DL) ("--> store_swap_high = %d KB\n", store_swap_high);
        debug(20, DL) ("--> store_swap_size = %d KB\n", store_swap_size);
        debug(20, DL) ("--> asking for        %d KB\n", kb_size);
-       assert(swap_help < 10);
+       assert(swap_help < SWAP_MAX_HELP);
     } else {
        swap_help = 0;
        DL = 3;