]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/tests/stub_store_rebuild.cc
2 * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
9 /* DEBUG: section 84 Helper process maintenance */
13 #include "SquidTime.h"
14 #include "store/Controller.h"
15 #include "store_rebuild.h"
19 #define STUB_API "stub_store_rebuild.cc"
20 #include "tests/STUB.h"
22 void storeRebuildProgress(int sd_index
, int total
, int sofar
) STUB
23 bool storeRebuildParseEntry(MemBuf
&, StoreEntry
&, cache_key
*, StoreRebuildData
&, uint64_t) STUB_RETVAL(false)
25 void StoreRebuildData::updateStartTime(const timeval
&dirStartTime
)
27 startTime
= started() ? std::min(startTime
, dirStartTime
) : dirStartTime
;
30 void storeRebuildComplete(StoreRebuildData
*)
32 --StoreController::store_dirs_rebuilding
;
33 if (StoreController::store_dirs_rebuilding
== 1)
34 --StoreController::store_dirs_rebuilding
; // normally in storeCleanup()
38 storeRebuildLoadEntry(int fd
, int diskIndex
, MemBuf
&buf
, StoreRebuildData
&)
43 assert(buf
.hasSpace()); // caller must allocate
44 // this stub simulates reading an empty entry
45 memset(buf
.space(), 0, buf
.spaceSize());
46 buf
.appended(buf
.spaceSize());
50 void Progress::print(std::ostream
&) const STUB