]> git.ipfire.org Git - thirdparty/squid.git/commit
Author: Alex Rousskov <rousskov@measurement-factory.com>
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 3 Sep 2009 12:57:49 +0000 (00:57 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 3 Sep 2009 12:57:49 +0000 (00:57 +1200)
commit556cea3c5e309959f898867d638aa68ac107b98d
treefab43f2810de1ccc7ca69ae94f8ad8c05998d50b
parent1843e0d1438671f34987e8d985a7ff625cfb8cbc
Author: Alex Rousskov <rousskov@measurement-factory.com>
Fixed entry size calculation for the max-size cache_dir selection algorithms.

There were two sides of this bug:

In src/store_swapout.cc, we must create metadata earlier because
storeCreate() needs swap_hdr_sz. With swap_hdr_sz unknown at the time of
storeCreate(), the SwapDir selection algorithms may select SwapDirs that
should not really take the entry as the real storage size (with the
metadata swap_hdr_sz) would exceed the store slot size.

In src/store_dir.cc, we must add the metadata size before looking for
cache_dirs that accept objsize. Only the "new"
storeDirSelectSwapDirRoundRobin selection scheme was affected.
src/store_dir.cc
src/store_swapout.cc