From: Dmitry Kurochkin Date: Sun, 30 Jan 2011 06:04:46 +0000 (+0300) Subject: Revert RockSwapDir changes. X-Git-Tag: take01~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0b10cfe23167498396d5590e4e3bb7ed71140451;p=thirdparty%2Fsquid.git Revert RockSwapDir changes. --- diff --git a/src/fs/rock/RockSwapDir.cc b/src/fs/rock/RockSwapDir.cc index e54310efa4..7bad86b11a 100644 --- a/src/fs/rock/RockSwapDir.cc +++ b/src/fs/rock/RockSwapDir.cc @@ -20,7 +20,7 @@ // must be divisible by 1024 due to cur_size and max_size KB madness const int64_t Rock::SwapDir::HeaderSize = 16*1024; -Rock::SwapDir::SwapDir(): ::SwapDir("rock"), filePath(NULL), io(NULL), map(0) +Rock::SwapDir::SwapDir(): ::SwapDir("rock"), filePath(NULL), io(NULL) { } @@ -173,14 +173,14 @@ Rock::SwapDir::validateOptions() static const int ps = getpagesize(); if (ps > 0 && (max_objsize % ps != 0)) fatal("Rock store max-size should be a multiple of page size"); - /* + const int64_t eLimitHi = 0xFFFFFF; // Core sfileno maximum const int64_t eLimitLo = map.entryLimit(); // dynamic shrinking unsupported const int64_t eWanted = (maximumSize() - HeaderSize)/max_objsize; const int64_t eAllowed = min(max(eLimitLo, eWanted), eLimitHi); map.resize(eAllowed); // the map may decide to use an even lower limit - */ + // Note: We could try to shrink max_size now. It is stored in KB so we // may not be able to make it match the end of the last entry exactly. const int64_t mapRoundWasteMx = max_objsize*sizeof(long)*8;