]> git.ipfire.org Git - thirdparty/squid.git/commit - src/fs/rock/RockRebuild.cc
Made Rock::Rebuild an AsyncJob because it is.
authorAlex Rousskov <rousskov@measurement-factory.com>
Mon, 7 Feb 2011 17:59:28 +0000 (10:59 -0700)
committerAlex Rousskov <rousskov@measurement-factory.com>
Mon, 7 Feb 2011 17:59:28 +0000 (10:59 -0700)
commit078274f6c5d9547ffc6cfb2fcde9cf04ba3d8e14
tree1135934799bd250ce6bcb04ecee93c6dbe860899
parentfa192c7105f6f67b35d28f487d5e3c89ad0fc35c
Made Rock::Rebuild an AsyncJob because it is.

Increment StoreController::store_dirs_rebuilding early, when SwapDir is
created and before the disk db file is opened and the actual rebuild starts.
Otherwise, if one SwapDir finishes rebuild before others start,
storeRebuildComplete() will see StoreController::store_dirs_rebuilding equal
to one, and think the rebuild is over.

This was not a problem for cache_dirs using blocking I/O because they either
did not try to open some file at SwapDir::init() time or did so synchronously,
resulting in "immediate" StoreController::store_dirs_rebuilding increment from
Store init loop point of view.
src/fs/rock/RockRebuild.cc
src/fs/rock/RockRebuild.h
src/fs/rock/RockSwapDir.cc