[PATCH] fixed entry size for max-size

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Wed, 02 Sep 2009 00:05:24 -0600

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.

HTH,

Alex.
P.S. I do not have a version of this patch generated against trunk, but
I hope it applies easily.

Received on Wed Sep 02 2009 - 06:07:47 MDT

This archive was generated by hypermail 2.2.0 : Thu Sep 03 2009 - 12:00:04 MDT