]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Removed "multiple of page size" restriction on cache_dir rock max-size.
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 1 Feb 2011 20:43:57 +0000 (13:43 -0700)
committerAlex Rousskov <rousskov@measurement-factory.com>
Tue, 1 Feb 2011 20:43:57 +0000 (13:43 -0700)
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.

src/fs/rock/RockSwapDir.cc

index 6f8e04c765ae59793c8acbca065a80d94f19f97f..9a8a4500c644a475aa4f4d69e418a77174ef499d 100644 (file)
@@ -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