From: Alex Rousskov Date: Tue, 1 Feb 2011 20:43:57 +0000 (-0700) Subject: Removed "multiple of page size" restriction on cache_dir rock max-size. X-Git-Tag: take02~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=95be26ed834fa89ac6da8e0e85559614e846364c;p=thirdparty%2Fsquid.git Removed "multiple of page size" restriction on cache_dir rock max-size. The restriction came from mmap writing days and was meant to prevent forcing mmap to read and merge the unchanged tail of a page we were updating. --- diff --git a/src/fs/rock/RockSwapDir.cc b/src/fs/rock/RockSwapDir.cc index 6f8e04c765..9a8a4500c6 100644 --- a/src/fs/rock/RockSwapDir.cc +++ b/src/fs/rock/RockSwapDir.cc @@ -232,15 +232,6 @@ Rock::SwapDir::validateOptions() if (max_objsize <= 0) fatal("Rock store requires a positive max-size"); - // Rock::IoState::startWriting() inflates write size to the end of the page - // so that mmap does not have to read the tail and then write it back. - // This is a weak check that the padded area will be allocated by [growing] - // MemBuf and a sufficient check that inflated size will not exceed the - // slot size. - static const int ps = getpagesize(); - if (ps > 0 && (max_objsize % ps != 0)) - fatal("Rock store max-size should be a multiple of page size"); - /* XXX: should we support resize? const int64_t eLimitHi = 0xFFFFFF; // Core sfileno maximum const int64_t eLimitLo = map->entryLimit(); // dynamic shrinking unsupported