#include <RockSwapDir.h>
Public Types | |
typedef RefCount< SwapDir > | Pointer |
typedef Ipc::StoreMap | DirMap |
Public Member Functions | |
SwapDir () | |
~SwapDir () override | |
void | reconfigure () override |
StoreEntry * | get (const cache_key *key) override |
void | evictCached (StoreEntry &) override |
void | evictIfFound (const cache_key *) override |
void | disconnect (StoreEntry &e) override |
called when the entry is about to forget its association with cache_dir More... | |
uint64_t | currentSize () const override |
current size More... | |
uint64_t | currentCount () const override |
the total number of objects stored right now More... | |
bool | doReportStat () const override |
void | finalizeSwapoutSuccess (const StoreEntry &) override |
finalize the successful swapout that has been already noticed by Store More... | |
void | finalizeSwapoutFailure (StoreEntry &) override |
abort the failed swapout that has been already noticed by Store More... | |
void | create () override |
create system resources needed for this store to operate in the future More... | |
void | parse (int index, char *path) override |
bool | smpAware () const override |
whether this disk storage is capable of serving multiple workers More... | |
bool | hasReadableEntry (const StoreEntry &) const override |
whether this cache dir has an entry with e.key More... | |
SBuf | inodeMapPath () const |
const char * | freeSlotsPath () const |
int64_t | entryLimitAbsolute () const |
Core limit. More... | |
int64_t | entryLimitActual () const |
max number of possible entries in db More... | |
int64_t | slotLimitAbsolute () const |
Rock store implementation limit. More... | |
int64_t | slotLimitActual () const |
total number of slots in this db More... | |
bool | validSlotId (const SlotId slotId) const |
whether the given slot ID may point to a slot in this db More... | |
SlotId | reserveSlotForWriting () |
finds and returns a free db slot to fill or throws More... | |
void | purgeSome () |
purges one or more entries to make full() false and free some slots More... | |
int64_t | diskOffset (Ipc::Mem::PageId &pageId) const |
int64_t | diskOffset (int filen) const |
void | writeError (StoreIOState &sio) |
void | noteFreeMapSlice (const Ipc::StoreMapSliceId fileno) override |
adjust slice-linked state before a locked Readable slice is erased More... | |
char const * | type () const |
virtual bool | active () const |
uint64_t | maxSize () const override |
uint64_t | minSize () const override |
the minimum size the store will shrink to via normal housekeeping More... | |
int64_t | maxObjectSize () const override |
the maximum size of a storable object; -1 if unlimited More... | |
void | maxObjectSize (int64_t newMax) |
void | getStats (StoreInfoStats &stats) const override |
collect statistics More... | |
void | stat (StoreEntry &) const override |
int64_t | minObjectSize () const |
the size of the smallest entry this cache_dir can store More... | |
bool | objectSizeIsAcceptable (int64_t objSize) const |
virtual void | dump (StoreEntry &) const |
virtual bool | doubleCheck (StoreEntry &) |
bool | canLog (StoreEntry const &e) const |
virtual void | openLog () |
virtual void | closeLog () |
virtual void | logEntry (const StoreEntry &e, int op) const |
virtual int | writeCleanStart () |
virtual void | writeCleanDone () |
virtual int | callback () |
called once every main loop iteration; TODO: Move to UFS code. More... | |
virtual void | sync () |
prepare for shutdown More... | |
virtual void | readCompleted (const char *buf, int len, int errflag, RefCount< ReadRequest >)=0 |
virtual void | writeCompleted (int errflag, size_t len, RefCount< WriteRequest >)=0 |
Public Attributes | |
uint64_t | slotSize |
all db slots are of this size More... | |
char * | path |
int | index |
int | disker |
disker kid id dedicated to this SwapDir or -1 More... | |
RemovalPolicy * | repl |
int | removals |
int | scanned |
struct Store::Disk::Flags | flags |
CleanLog * | cleanLog |
struct { | |
int blksize | |
} | fs |
Protected Member Functions | |
bool | anchorToCache (StoreEntry &) override |
bool | updateAnchored (StoreEntry &) override |
bool | needsDiskStrand () const override |
needs a dedicated kid process More... | |
void | init () override |
ConfigOption * | getOptionTree () const override |
bool | allowOptionReconfigure (const char *const option) const override |
bool | canStore (const StoreEntry &e, int64_t diskSpaceNeeded, int &load) const override |
check whether we can store the entry; if we can, report current load More... | |
StoreIOState::Pointer | createStoreIO (StoreEntry &, StoreIOState::STIOCB *, void *) override |
StoreIOState::Pointer | openStoreIO (StoreEntry &, StoreIOState::STIOCB *, void *) override |
void | maintain () override |
purge while full(); it should be sufficient to purge just one More... | |
void | diskFull () override |
void | reference (StoreEntry &e) override |
somebody needs this entry (many cache replacement policies need to know) More... | |
bool | dereference (StoreEntry &e) override |
void | updateHeaders (StoreEntry *e) override |
make stored metadata and HTTP headers the same as in the given entry More... | |
bool | unlinkdUseful () const override |
whether SwapDir may benefit from unlinkd More... | |
void | statfs (StoreEntry &e) const override |
void | ioCompletedNotification () override |
void | closeCompleted () override |
void | readCompleted (const char *buf, int len, int errflag, RefCount< ::ReadRequest >) override |
void | writeCompleted (int errflag, size_t len, RefCount< ::WriteRequest >) override |
void | parseSize (const bool reconfiguring) |
parses anonymous cache_dir size option More... | |
void | validateOptions () |
warns of configuration problems; may quit More... | |
bool | parseTimeOption (char const *option, const char *value, int reconfiguring) |
parses time-specific options; mimics SwapDir::optionObjectSizeParse() More... | |
void | dumpTimeOption (StoreEntry *e) const |
reports time-specific options; mimics SwapDir::optionObjectSizeDump() More... | |
bool | parseRateOption (char const *option, const char *value, int reconfiguring) |
parses rate-specific options; mimics SwapDir::optionObjectSizeParse() More... | |
void | dumpRateOption (StoreEntry *e) const |
reports rate-specific options; mimics SwapDir::optionObjectSizeDump() More... | |
bool | parseSizeOption (char const *option, const char *value, int reconfiguring) |
parses size-specific options; mimics SwapDir::optionObjectSizeParse() More... | |
void | dumpSizeOption (StoreEntry *e) const |
reports size-specific options; mimics SwapDir::optionObjectSizeDump() More... | |
bool | full () const |
no more entries can be stored without purging More... | |
void | trackReferences (StoreEntry &e) |
add to replacement policy scope More... | |
void | ignoreReferences (StoreEntry &e) |
delete from repl policy scope More... | |
int64_t | diskOffsetLimit () const |
void | updateHeadersOrThrow (Ipc::StoreMapUpdate &update) |
StoreIOState::Pointer | createUpdateIO (const Ipc::StoreMapUpdate &, StoreIOState::STIOCB *, void *) |
void | anchorEntry (StoreEntry &e, const sfileno filen, const Ipc::StoreMapAnchor &anchor) |
void | parseOptions (int reconfiguring) |
void | dumpOptions (StoreEntry *e) const |
int64_t | sizeInBlocks (const int64_t size) const |
Protected Attributes | |
const char * | filePath |
location of cache storage file inside path/ More... | |
DirMap * | map |
entry key/sfileno to MaxExtras/inode mapping More... | |
uint64_t | max_size |
maximum allocatable size of the storage area More... | |
int64_t | min_objsize |
minimum size of any object stored here (-1 for no limit) More... | |
int64_t | max_objsize |
maximum size of any object stored here (-1 for no limit) More... | |
Private Member Functions | |
void | createError (const char *const msg) |
void | handleWriteCompletionSuccess (const WriteRequest &request) |
code shared by writeCompleted() success handling cases More... | |
void | handleWriteCompletionProblem (const int errflag, const WriteRequest &request) |
code shared by writeCompleted() error handling cases More... | |
bool | optionReadOnlyParse (char const *option, const char *value, int reconfiguring) |
void | optionReadOnlyDump (StoreEntry *e) const |
bool | optionObjectSizeParse (char const *option, const char *value, int reconfiguring) |
void | optionObjectSizeDump (StoreEntry *e) const |
Private Attributes | |
DiskIOStrategy * | io |
RefCount< DiskFile > | theFile |
cache storage for this cache_dir More... | |
Ipc::Mem::Pointer< Ipc::Mem::PageStack > | freeSlots |
all unused slots More... | |
Ipc::Mem::PageId * | waitingForPage |
one-page cache for a "hot" free slot More... | |
DiskFile::Config | fileConfig |
file-level configuration options More... | |
char const * | theType |
Static Private Attributes | |
static const int64_t | HeaderSize = 16*1024 |
on-disk db header size More... | |
Friends | |
class | Rebuild |
class | IoState |
class | HeaderUpdater |
Detailed Description
Definition at line 32 of file RockSwapDir.h.
Member Typedef Documentation
◆ DirMap
typedef Ipc::StoreMap Rock::SwapDir::DirMap |
Definition at line 36 of file RockSwapDir.h.
◆ Pointer
typedef RefCount<SwapDir> Rock::SwapDir::Pointer |
Definition at line 35 of file RockSwapDir.h.
Constructor & Destructor Documentation
◆ SwapDir()
Rock::SwapDir::SwapDir | ( | ) |
Definition at line 41 of file RockSwapDir.cc.
◆ ~SwapDir()
|
override |
Definition at line 47 of file RockSwapDir.cc.
References safe_free.
Member Function Documentation
◆ active()
|
virtualinherited |
may be used in this strand
Definition at line 236 of file Disk.cc.
References IamWorkerProcess(), and KidIdentifier.
Referenced by Store::Disks::anchorToCache(), and Store::Disk::doReportStat().
◆ allowOptionReconfigure()
|
overrideprotectedvirtual |
Reimplemented from Store::Disk.
Definition at line 388 of file RockSwapDir.cc.
References Store::Disk::allowOptionReconfigure().
◆ anchorEntry()
|
protected |
Definition at line 106 of file RockSwapDir.cc.
References StoreEntry::attachToDisk(), Ipc::StoreMapAnchor::complete(), EBIT_SET, ENTRY_VALIDATED, Ipc::StoreMapAnchor::exportInto(), StoreEntry::flags, PING_NONE, StoreEntry::ping_status, STORE_OK, STORE_PENDING, StoreEntry::store_status, SWAPOUT_DONE, and SWAPOUT_WRITING.
◆ anchorToCache()
|
overrideprotectedvirtual |
tie StoreEntry to this storage if this storage has a matching entry
- Return values
-
true if this storage has a matching entry
Reimplemented from Store::Controlled.
Definition at line 75 of file RockSwapDir.cc.
References Assure, StoreEntry::hasDisk(), and hash_link::key.
◆ callback()
|
inlinevirtualinherited |
Reimplemented in Fs::Ufs::UFSSwapDir, Store::Controller, Store::Disks, and StoreControllerStub.
◆ canLog()
|
inherited |
Definition at line 188 of file Disk.cc.
References EBIT_TEST, ENTRY_SPECIAL, StoreEntry::flags, StoreEntry::hasDisk(), KEY_PRIVATE, RELEASE_REQUEST, StoreEntry::swap_file_sz, and StoreEntry::swappedOut().
◆ canStore()
|
overrideprotectedvirtual |
Implements Store::Disk.
Definition at line 583 of file RockSwapDir.cc.
References Store::Disk::canStore(), debugs, Ipc::Mem::PageId::ioPage, Ipc::Mem::PageLevel(), and Ipc::Mem::PageLimit().
◆ closeCompleted()
|
overrideprotectedvirtual |
Implements IORequestor.
Definition at line 834 of file RockSwapDir.cc.
◆ closeLog()
|
virtualinherited |
Reimplemented in Fs::Ufs::UFSSwapDir.
Definition at line 215 of file Disk.cc.
Referenced by storeDirCloseSwapLogs().
◆ create()
|
overridevirtual |
Implements Store::Storage.
Definition at line 211 of file RockSwapDir.cc.
References assert, DBG_IMPORTANT, debugs, IamDiskProcess(), Must, O_BINARY, and UsingSmp().
Referenced by TestRock::setUp().
◆ createError()
|
private |
Definition at line 271 of file RockSwapDir.cc.
References DBG_CRITICAL, debugs, fatal(), and xstrerr().
◆ createStoreIO()
|
overrideprotectedvirtual |
Implements Store::Disk.
Definition at line 612 of file RockSwapDir.cc.
References assert, debugs, Rock::IoState::file(), hash_link::key, Ipc::StoreMapAnchor::set(), StoreIOState::swap_dirn, StoreIOState::swap_filen, and Rock::IoState::writeableAnchor_.
◆ createUpdateIO()
|
protected |
Definition at line 652 of file RockSwapDir.cc.
References Ipc::StoreMapUpdate::Edition::anchor, debugs, Ipc::StoreMapUpdate::entry, Rock::IoState::file(), Ipc::StoreMapUpdate::Edition::fileNo, Ipc::StoreMapUpdate::fresh, Must, StoreIOState::swap_dirn, StoreIOState::swap_filen, and Rock::IoState::writeableAnchor_.
◆ currentCount()
|
overridevirtual |
Implements Store::Storage.
Definition at line 156 of file RockSwapDir.cc.
Referenced by TestRock::testRockSwapOut().
◆ currentSize()
|
overridevirtual |
Implements Store::Storage.
Definition at line 147 of file RockSwapDir.cc.
◆ dereference()
|
overrideprotectedvirtual |
somebody no longer needs this entry (usually after calling reference()) return false iff the idle entry should be destroyed
Implements Store::Controlled.
Definition at line 997 of file RockSwapDir.cc.
References debugs, StoreEntry::repl, StoreEntry::swap_dirn, and StoreEntry::swap_filen.
◆ disconnect()
|
overridevirtual |
Reimplemented from Store::Disk.
Definition at line 120 of file RockSwapDir.cc.
References assert, CollapsedForwarding::Broadcast(), StoreEntry::detachFromDisk(), StoreEntry::hasDisk(), StoreEntry::mem_obj, MemObject::SwapOut::sio, StoreEntry::storeWriterDone(), StoreEntry::swap_filen, MemObject::swapout, and Rock::IoState::writeableAnchor_.
◆ diskFull()
|
overrideprotectedvirtual |
Notify this disk that it is full. XXX move into a protected api call between store files and their stores, rather than a top level api call
Reimplemented from Store::Disk.
Definition at line 972 of file RockSwapDir.cc.
References DBG_IMPORTANT, and debugs.
◆ diskOffset() [1/2]
int64_t Rock::SwapDir::diskOffset | ( | int | filen | ) | const |
◆ diskOffset() [2/2]
int64_t Rock::SwapDir::diskOffset | ( | Ipc::Mem::PageId & | pageId | ) | const |
Definition at line 686 of file RockSwapDir.cc.
References assert, and Ipc::Mem::PageId::number.
◆ diskOffsetLimit()
|
protected |
Definition at line 693 of file RockSwapDir.cc.
References assert.
Referenced by Rock::Rebuild::Rebuild().
◆ doReportStat()
|
overridevirtual |
In SMP mode only the disker process reports stats to avoid counting the same stats by multiple processes.
Reimplemented from Store::Disk.
Definition at line 164 of file RockSwapDir.cc.
References IamDiskProcess(), and UsingSmp().
◆ doubleCheck()
|
virtualinherited |
Reimplemented in Fs::Ufs::UFSSwapDir.
Definition at line 46 of file Disk.cc.
Referenced by storeCleanup().
◆ dump()
|
virtualinherited |
Reimplemented in Fs::Ufs::UFSSwapDir.
◆ dumpOptions()
|
protectedinherited |
Definition at line 307 of file Disk.cc.
References ConfigOption::dump().
◆ dumpRateOption()
|
protected |
Definition at line 486 of file RockSwapDir.cc.
References storeAppendPrintf().
Referenced by getOptionTree().
◆ dumpSizeOption()
|
protected |
Definition at line 534 of file RockSwapDir.cc.
References PRId64, and storeAppendPrintf().
Referenced by getOptionTree().
◆ dumpTimeOption()
|
protected |
Definition at line 435 of file RockSwapDir.cc.
References PRId64, and storeAppendPrintf().
Referenced by getOptionTree().
◆ entryLimitAbsolute()
|
inline |
Definition at line 62 of file RockSwapDir.h.
References SwapFilenMax.
◆ entryLimitActual()
int64_t Rock::SwapDir::entryLimitActual | ( | ) | const |
Definition at line 204 of file RockSwapDir.cc.
References min().
Referenced by Rock::Rebuild::Rebuild(), and Rock::Rebuild::Stats::completed().
◆ evictCached()
|
overridevirtual |
Prevent new get() calls from returning the matching entry. If the matching entry is unused, it may be removed from the store now. The store entry is matched using either e
attachment info or e.key
.
Implements Store::Storage.
Definition at line 1022 of file RockSwapDir.cc.
References CollapsedForwarding::Broadcast(), debugs, StoreEntry::hasDisk(), StoreEntry::locked(), StoreEntry::publicKey(), and StoreEntry::swap_filen.
◆ evictIfFound()
|
overridevirtual |
An evictCached() equivalent for callers that did not get() a StoreEntry. Callers with StoreEntry objects must use evictCached() instead.
Implements Store::Storage.
Definition at line 1015 of file RockSwapDir.cc.
◆ finalizeSwapoutFailure()
|
overridevirtual |
◆ finalizeSwapoutSuccess()
|
overridevirtual |
Implements Store::Disk.
Definition at line 170 of file RockSwapDir.cc.
References assert, StoreEntry::mem_obj, MemObject::SwapOut::sio, MemObject::swapout, and Rock::IoState::writeableAnchor_.
◆ freeSlotsPath()
const char * Rock::SwapDir::freeSlotsPath | ( | ) | const |
Definition at line 1106 of file RockSwapDir.cc.
References String::append(), and String::termedBuf().
◆ full()
|
protected |
Definition at line 964 of file RockSwapDir.cc.
◆ get()
|
overridevirtual |
- Returns
- a possibly unlocked/unregistered stored entry with key (or nil) The returned entry might not match the caller's Store ID or method. The caller must abandon()/release() the entry or register it with Root(). This method must not trigger slow I/O operations (e.g., disk swap in).
Implements Store::Controlled.
Definition at line 56 of file RockSwapDir.cc.
References StoreEntry::createMemObject().
◆ getOptionTree()
|
overrideprotectedvirtual |
Reimplemented from Store::Disk.
Definition at line 369 of file RockSwapDir.cc.
References dumpRateOption(), dumpSizeOption(), dumpTimeOption(), Store::Disk::getOptionTree(), parseRateOption(), parseSizeOption(), parseTimeOption(), and vector.
◆ getStats()
|
overridevirtualinherited |
◆ handleWriteCompletionProblem()
|
private |
Definition at line 920 of file RockSwapDir.cc.
References Rock::WriteRequest::sidCurrent, and Rock::WriteRequest::sio.
◆ handleWriteCompletionSuccess()
|
private |
Definition at line 881 of file RockSwapDir.cc.
References assert, DISK_OK, Rock::WriteRequest::eof, WriteRequest::len, Must, Ipc::StoreMapSlice::next, Rock::WriteRequest::sidCurrent, Rock::WriteRequest::sidPrevious, Rock::WriteRequest::sio, and Ipc::StoreMapSlice::size.
◆ hasReadableEntry()
|
overridevirtual |
◆ ignoreReferences()
|
protected |
Definition at line 1044 of file RockSwapDir.cc.
References debugs, and StoreEntry::repl.
◆ init()
|
overrideprotectedvirtual |
Start preparing the store for use. To check readiness, callers should use readable() and writable() methods.
Implements Store::Storage.
Definition at line 280 of file RockSwapDir.cc.
References DBG_CRITICAL, debugs, fatal(), DiskIOModule::Find(), Must, MYNAME, and shm_old.
◆ inodeMapPath()
SBuf Rock::SwapDir::inodeMapPath | ( | ) | const |
Definition at line 1100 of file RockSwapDir.cc.
References Ipc::Mem::Segment::Name().
◆ ioCompletedNotification()
|
overrideprotectedvirtual |
Implements IORequestor.
Definition at line 813 of file RockSwapDir.cc.
References debugs, fatalf(), Rock::Rebuild::Start(), storeRebuildComplete(), and xstrerr().
◆ logEntry()
|
virtualinherited |
Reimplemented in Fs::Ufs::UFSSwapDir.
Definition at line 227 of file Disk.cc.
Referenced by storeDirSwapLog().
◆ maintain()
|
overrideprotectedvirtual |
Implements Store::Storage.
Definition at line 980 of file RockSwapDir.cc.
◆ maxObjectSize() [1/2]
|
overridevirtualinherited |
Implements Store::Storage.
Definition at line 103 of file Disk.cc.
References Config, SquidConfig::maxObjectSize, min(), and SquidConfig::Store.
Referenced by Fs::Ufs::UFSStoreState::write().
◆ maxObjectSize() [2/2]
|
inherited |
configure the maximum object size for this storage area. May be any size up to the total storage area.
Definition at line 115 of file Disk.cc.
References DBG_PARSE_NOTE, and debugs.
◆ maxSize()
|
inlineoverridevirtualinherited |
The maximum size the store will support in normal use. Inaccuracy is permitted, but may throw estimates for memory etc out of whack.
Implements Store::Storage.
Reimplemented in TestSwapDir.
Definition at line 48 of file Disk.h.
References Store::Disk::max_size.
◆ minObjectSize()
|
inherited |
Definition at line 96 of file Disk.cc.
References Config, SquidConfig::minObjectSize, and SquidConfig::Store.
◆ minSize()
|
overridevirtualinherited |
Implements Store::Storage.
Definition at line 89 of file Disk.cc.
References Config, SquidConfig::lowWaterMark, and SquidConfig::Swap.
◆ needsDiskStrand()
|
overrideprotectedvirtual |
Reimplemented from Store::Disk.
Definition at line 311 of file RockSwapDir.cc.
References Config, DiskIOModule::Find(), InDaemonMode(), and SquidConfig::workers.
◆ noteFreeMapSlice()
|
overridevirtual |
Implements Ipc::StoreMapCleaner.
Definition at line 740 of file RockSwapDir.cc.
References Ipc::Mem::PageStack::IdForSwapDirSpace(), Ipc::Mem::PageId::number, and Ipc::Mem::PageId::pool.
◆ objectSizeIsAcceptable()
|
inherited |
◆ openLog()
|
virtualinherited |
Reimplemented in Fs::Ufs::UFSSwapDir.
Definition at line 212 of file Disk.cc.
Referenced by storeDirOpenSwapLogs().
◆ openStoreIO()
|
overrideprotectedvirtual |
Implements Store::Disk.
Definition at line 755 of file RockSwapDir.cc.
References assert, Ipc::StoreMapAnchor::basics, debugs, Rock::IoState::file(), StoreEntry::hasDisk(), Ipc::Mem::PageId::ioPage, Ipc::Mem::PageLevel(), Ipc::Mem::PageLimit(), StoreEntry::publicKey(), Rock::IoState::readableAnchor_, Ipc::StoreMapAnchor::sameKey(), StoreIOState::swap_dirn, Ipc::StoreMapAnchor::Basics::swap_file_sz, StoreEntry::swap_file_sz, StoreEntry::swap_filen, and StoreIOState::swap_filen.
◆ optionObjectSizeDump()
|
privateinherited |
Definition at line 382 of file Disk.cc.
References PRId64, and storeAppendPrintf().
Referenced by Store::Disk::getOptionTree().
◆ optionObjectSizeParse()
|
privateinherited |
Definition at line 347 of file Disk.cc.
References DBG_IMPORTANT, debugs, self_destruct(), size, and strtoll().
Referenced by Store::Disk::getOptionTree().
◆ optionReadOnlyDump()
|
privateinherited |
Definition at line 340 of file Disk.cc.
References storeAppendPrintf().
Referenced by Store::Disk::getOptionTree().
◆ optionReadOnlyParse()
|
privateinherited |
Definition at line 318 of file Disk.cc.
References DBG_PARSE_NOTE, debugs, and xatoi().
Referenced by Store::Disk::getOptionTree().
◆ parse()
|
overridevirtual |
Implements Store::Disk.
Definition at line 320 of file RockSwapDir.cc.
References String::append(), assert, String::termedBuf(), and xstrdup.
Referenced by TestRock::setUp().
◆ parseOptions()
|
protectedinherited |
Definition at line 267 of file Disk.cc.
References DBG_IMPORTANT, debugs, ConfigParser::NextToken(), ConfigOption::parse(), and self_destruct().
◆ parseRateOption()
|
protected |
Definition at line 444 of file RockSwapDir.cc.
References DBG_CRITICAL, DBG_IMPORTANT, debugs, self_destruct(), and strtoll().
Referenced by getOptionTree().
◆ parseSize()
|
protected |
parse maximum db disk size
Definition at line 352 of file RockSwapDir.cc.
References DBG_IMPORTANT, debugs, fatal(), and GetInteger().
◆ parseSizeOption()
|
protected |
Definition at line 494 of file RockSwapDir.cc.
References DBG_CRITICAL, DBG_IMPORTANT, debugs, self_destruct(), and strtoll().
Referenced by getOptionTree().
◆ parseTimeOption()
|
protected |
Definition at line 396 of file RockSwapDir.cc.
References DBG_CRITICAL, DBG_IMPORTANT, debugs, self_destruct(), and strtoll().
Referenced by getOptionTree().
◆ purgeSome()
void Rock::SwapDir::purgeSome | ( | ) |
◆ readCompleted() [1/2]
|
overrideprotected |
Definition at line 840 of file RockSwapDir.cc.
References assert, RefCount< C >::getRaw(), Rock::IoState::handleReadCompletion(), and Rock::ReadRequest::sio.
◆ readCompleted() [2/2]
|
pure virtualinherited |
Implemented in Fs::Ufs::UFSStoreState.
Referenced by MmappedFile::read(), IpcIoFile::readCompleted(), DiskdFile::readDone(), BlockingFile::readDone(), and DiskThreadsDiskFile::readDone().
◆ reconfigure()
|
overridevirtual |
Implements Store::Disk.
Definition at line 342 of file RockSwapDir.cc.
◆ reference()
|
overrideprotectedvirtual |
Implements Store::Controlled.
Definition at line 989 of file RockSwapDir.cc.
References debugs, StoreEntry::repl, StoreEntry::swap_dirn, and StoreEntry::swap_filen.
◆ reserveSlotForWriting()
Rock::SlotId Rock::SwapDir::reserveSlotForWriting | ( | ) |
Definition at line 700 of file RockSwapDir.cc.
References assert, debugs, Ipc::Mem::PageId::number, Ipc::Mem::PageId::set(), and TexcHere.
◆ sizeInBlocks()
|
inlineprotectedinherited |
Definition at line 87 of file Disk.h.
References Store::Disk::fs, and size.
◆ slotLimitAbsolute()
int64_t Rock::SwapDir::slotLimitAbsolute | ( | ) | const |
Definition at line 186 of file RockSwapDir.cc.
◆ slotLimitActual()
int64_t Rock::SwapDir::slotLimitActual | ( | ) | const |
Definition at line 195 of file RockSwapDir.cc.
Referenced by Rock::Rebuild::Rebuild(), and Rock::Rebuild::Stats::completed().
◆ smpAware()
|
inlineoverridevirtual |
Implements Store::Disk.
Definition at line 54 of file RockSwapDir.h.
◆ stat()
|
overridevirtualinherited |
Output stats to the provided store entry. TODO: make these calls asynchronous
Implements Store::Storage.
Reimplemented in TestSwapDir.
Definition at line 63 of file Disk.cc.
References storeAppendPrintf().
◆ statfs()
|
overrideprotectedvirtual |
Reimplemented from Store::Disk.
Definition at line 1052 of file RockSwapDir.cc.
References Config, Math::doublePercent(), SquidConfig::max_open_disk_fds, PRIu64, Ping::stats, store_open_disk_fd, and storeAppendPrintf().
◆ sync()
|
inlinevirtualinherited |
Reimplemented in Fs::Ufs::UFSSwapDir, Store::Controller, and Store::Disks.
◆ trackReferences()
|
protected |
Definition at line 1036 of file RockSwapDir.cc.
References debugs, and StoreEntry::repl.
◆ type()
◆ unlinkdUseful()
|
overrideprotectedvirtual |
Implements Store::Disk.
Definition at line 1008 of file RockSwapDir.cc.
◆ updateAnchored()
|
overrideprotectedvirtual |
Update a local Transients entry with fresh info from this cache (if any). Return true iff the cache supports Transients entries and the given local Transients entry is now in sync with this storage.
Reimplemented from Store::Controlled.
Definition at line 93 of file RockSwapDir.cc.
References assert, StoreEntry::hasDisk(), StoreEntry::swap_file_sz, and StoreEntry::swap_filen.
◆ updateHeaders()
|
overrideprotectedvirtual |
Reimplemented from Store::Controlled.
Definition at line 946 of file RockSwapDir.cc.
References debugs, AsyncJob::Start(), and StoreEntry::swap_filen.
◆ updateHeadersOrThrow()
|
protected |
◆ validateOptions()
|
protected |
check the results of the configuration; only level-0 debugging works here
Definition at line 541 of file RockSwapDir.cc.
References DBG_CRITICAL, debugs, fatal(), and max().
◆ validSlotId()
bool Rock::SwapDir::validSlotId | ( | const SlotId | slotId | ) | const |
Definition at line 734 of file RockSwapDir.cc.
◆ writeCleanDone()
|
virtualinherited |
Reimplemented in Fs::Ufs::UFSSwapDir.
Definition at line 224 of file Disk.cc.
Referenced by storeDirWriteCleanLogs().
◆ writeCleanStart()
|
virtualinherited |
Reimplemented in Fs::Ufs::UFSSwapDir.
◆ writeCompleted() [1/2]
|
overrideprotected |
Definition at line 849 of file RockSwapDir.cc.
References assert, CollapsedForwarding::Broadcast(), debugs, DISK_ERROR, DISK_OK, StoreIOState::e, Rock::WriteRequest::eof, Rock::IoState::expectedReply(), RefCount< C >::getRaw(), Rock::WriteRequest::id, WriteRequest::len, Rock::WriteRequest::sidCurrent, Rock::WriteRequest::sio, Rock::IoState::stillWaiting(), StoreIOState::swap_filen, and StoreIOState::touchingStoreEntry().
◆ writeCompleted() [2/2]
|
pure virtualinherited |
Implemented in Fs::Ufs::UFSStoreState.
Referenced by MmappedFile::write(), IpcIoFile::writeCompleted(), DiskdFile::writeDone(), BlockingFile::writeDone(), and DiskThreadsDiskFile::writeDone().
◆ writeError()
void Rock::SwapDir::writeError | ( | StoreIOState & | sio | ) |
Definition at line 932 of file RockSwapDir.cc.
References CollapsedForwarding::Broadcast(), StoreIOState::e, StoreIOState::swap_filen, and StoreIOState::touchingStoreEntry().
Friends And Related Function Documentation
◆ HeaderUpdater
|
friend |
Definition at line 134 of file RockSwapDir.h.
◆ IoState
Definition at line 133 of file RockSwapDir.h.
◆ Rebuild
Definition at line 132 of file RockSwapDir.h.
Member Data Documentation
◆ blksize
◆ cleanLog
|
inherited |
Definition at line 140 of file Disk.h.
Referenced by UFSCleanLog::write().
◆ disker
◆ fileConfig
|
private |
Definition at line 149 of file RockSwapDir.h.
◆ filePath
|
protected |
Definition at line 135 of file RockSwapDir.h.
Referenced by Rock::Rebuild::Start().
◆ flags
|
inherited |
Referenced by storeDirSelectSwapDirLeastLoad().
◆ freeSlots
|
private |
Definition at line 145 of file RockSwapDir.h.
◆
struct { ... } Store::Disk::fs |
Referenced by Store::Disk::Disk(), and Store::Disk::sizeInBlocks().
◆ HeaderSize
|
staticprivate |
Definition at line 151 of file RockSwapDir.h.
Referenced by Rock::Rebuild::start().
◆ index
|
inherited |
Definition at line 103 of file Disk.h.
Referenced by Fs::Ufs::UFSStoreState::UFSStoreState(), and Rock::Rebuild::Start().
◆ io
|
private |
Definition at line 143 of file RockSwapDir.h.
◆ map
|
protected |
Definition at line 136 of file RockSwapDir.h.
◆ max_objsize
◆ max_size
|
protectedinherited |
Definition at line 97 of file Disk.h.
Referenced by Store::Disk::maxSize().
◆ min_objsize
◆ path
|
inherited |
Definition at line 102 of file Disk.h.
Referenced by Fs::Ufs::UFSSwapDir::DirClean(), Rock::Rebuild::Stats::Init(), and Rock::Rebuild::Start().
◆ removals
◆ repl
|
inherited |
◆ scanned
◆ slotSize
uint64_t Rock::SwapDir::slotSize |
Definition at line 83 of file RockSwapDir.h.
Referenced by Rock::Rebuild::Rebuild().
◆ theFile
Definition at line 144 of file RockSwapDir.h.
◆ theType
◆ waitingForPage
|
private |
Definition at line 146 of file RockSwapDir.h.
The documentation for this class was generated from the following files:
- src/fs/rock/RockSwapDir.h
- src/fs/rock/RockSwapDir.cc