/*
- * $Id: store_dir_aufs.cc,v 1.12 2000/11/01 03:35:47 wessels Exp $
+ * $Id: store_dir_aufs.cc,v 1.13 2000/11/01 21:48:16 wessels Exp $
*
* DEBUG: section 47 Store Directory Routines
* AUTHOR: Duane Wessels
if (store_dirs_rebuilding) {
return;
} else {
- /* XXX FixMe: This should use the cache_dir hig/low values, not the
- * global ones
- */
f = (double) (store_swap_size - store_swap_low) / (store_swap_high - store_swap_low);
f = f < 0.0 ? 0.0 : f > 1.0 ? 1.0 : f;
max_scan = (int) (f * 400.0 + 100.0);
f, max_scan, max_remove);
walker = SD->repl->PurgeInit(SD->repl, max_scan);
while (1) {
- /* XXX FixMe: This should use the cache_dir hig/low values, not the
- * global ones
- */
- if (store_swap_size < store_swap_low)
+ if (SD->cur_size < SD->low_size)
break;
if (removed >= max_remove)
break;
/*
- * $Id: store_dir_ufs.cc,v 1.12 2000/11/01 03:35:49 wessels Exp $
+ * $Id: store_dir_ufs.cc,v 1.13 2000/11/01 21:48:18 wessels Exp $
*
* DEBUG: section 47 Store Directory Routines
* AUTHOR: Duane Wessels
if (store_dirs_rebuilding) {
return;
} else {
- /* XXX FixMe: This should use the cache_dir hig/low values, not the
- * global ones
- */
- f = (double) (store_swap_size - store_swap_low) / (store_swap_high - store_swap_low);
+ f = (double) (SD->cur_size - SD->low_size) / (SD->max_size - SD->low_size);
f = f < 0.0 ? 0.0 : f > 1.0 ? 1.0 : f;
max_scan = (int) (f * 400.0 + 100.0);
max_remove = (int) (f * 70.0 + 10.0);
debug(20, 3) ("storeMaintainSwapSpace: f=%f, max_scan=%d, max_remove=%d\n", f, max_scan, max_remove);
walker = SD->repl->PurgeInit(SD->repl, max_scan);
while (1) {
- /* XXX FixMe: This should use the cache_dir hig/low values, not the
- * global ones
- */
- if (store_swap_size < store_swap_low)
+ if (SD->cur_size < SD->low_size)
break;
if (removed >= max_remove)
break;