From: Alex Rousskov Date: Tue, 1 Feb 2011 20:27:13 +0000 (-0700) Subject: Do not start rebuilding cache_dir (i.e., loading its index into RAM) until we X-Git-Tag: take02~25 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9cfba26cada9c6aeedb2d11fe019c3b529e8405a;p=thirdparty%2Fsquid.git Do not start rebuilding cache_dir (i.e., loading its index into RAM) until we complete cache_dir initialization sequence, which ends in not in Rock::SwapDir::init but in Rock::SwapDir::ioCompletedNotification where we open the shared map or bail on errors. It does not make sense to start loading index before the map is configured because there will be no place to store loaded information. --- diff --git a/src/fs/rock/RockSwapDir.cc b/src/fs/rock/RockSwapDir.cc index d9a1ccb575..6f8e04c765 100644 --- a/src/fs/rock/RockSwapDir.cc +++ b/src/fs/rock/RockSwapDir.cc @@ -185,8 +185,6 @@ Rock::SwapDir::init() theFile = io->newFile(filePath); theFile->open(O_RDWR, 0644, this); - - rebuild(); } void @@ -453,6 +451,8 @@ Rock::SwapDir::ioCompletedNotification() debugs(47,1, "Rock cache_dir[" << index << "] limits: " << std::setw(12) << maximumSize() << " disk bytes and " << std::setw(7) << map->entryLimit() << " entries"); + + rebuild(); } void