void
SwapDir::optionObjectSizeDump(StoreEntry * e) const
{
- if (min_objsize != -1)
+ if (min_objsize != 0)
storeAppendPrintf(e, " min-size=%"PRId64, min_objsize);
if (max_objsize != -1)
{
public:
- SwapDir(char const *aType) : theType (aType), cur_size(0), max_size(0), min_objsize(-1), max_objsize(-1), cleanLog(NULL) {
+ SwapDir(char const *aType) : theType (aType), cur_size(0), max_size(0), min_objsize(0), max_objsize(-1), cleanLog(NULL) {
fs.blksize = 1024;
path = NULL;
}
no-store, no new objects should be stored to this cache_dir
+ min-size=n, refers to the min object size in bytes this cache_dir
+ will accept. It's used to restrict a cache_dir to only store
+ large objects (e.g. aufs) while other storedirs are optimized
+ for smaller objects (e.g. COSS). Defaults to 0.
+
max-size=n, refers to the max object size in bytes this cache_dir
supports. It is used to select the cache_dir to store the object.
Note: To make optimal use of the max-size limits you should order
SwapDir::objectSizeIsAcceptable(int64_t objsize) const
{
// If the swapdir has no range limits, then it definitely can
- if (min_objsize == -1 && max_objsize == -1)
+ if (min_objsize <= 0 && max_objsize == -1)
return true;
/*