]> git.ipfire.org Git - thirdparty/squid.git/commit
Make squid -z for cache_dir rock work like UFS instead of like COSS.
authorAlex Rousskov <rousskov@measurement-factory.com>
Fri, 8 Feb 2013 04:14:50 +0000 (21:14 -0700)
committerAlex Rousskov <rousskov@measurement-factory.com>
Fri, 8 Feb 2013 04:14:50 +0000 (21:14 -0700)
commit04632397988b3107be03d927ae67c8b9813a2171
tree9bbc86ebdf7b6e5262659acef5642725c7b3fa04
parent5444ee4802d1dbec0405af2974ac6b8b7aeac54d
Make squid -z for cache_dir rock work like UFS instead of like COSS.
Polish -z documentation and cache.log reporting.

When a startup script runs squid -z by mistake against a cache_dir that is
already initialized and full of cached entries, some admins prefer that
nothing happens. Rock store now skips reinitialization if both the cache_dir
directory and the db file in that directory exist. If one or both are missing,
the missing pieces are created.

UFS does something similar because it creates missing L1 and L2 directories
but does not erase any entries already present in the cache_dir path. COSS,
OTOH, re-initializes the existing db. Rock behavior will now be closer to UFS.

To clean a corrupted cache_dir, the admin must remove its top-level directory
before running squid -z.

Squid now logs "Creating missing swap directories" instead of "Creating Swap
Directories", and our documentation now reflects the "if missing" part of the
-z algorithm.

Also documented that recent Squid versions run -z in daemon mode (so that SMP
configuration macros continue to work).
src/fs/rock/RockSwapDir.cc
src/main.cc
src/squid.8.in