UFSSwapDir.h
Go to the documentation of this file.
Definition: ConfigOption.h:68
Definition: ConfigOption.h:58
Definition: DiskIOModule.h:21
Definition: FileMap.h:24
Definition: UFSStrategy.h:25
Definition: UFSSwapDir.h:31
bool pathIsDirectory(const char *path) const
Definition: UFSSwapDir.cc:628
ConfigOptionVector * currentIOOptions
Definition: UFSSwapDir.h:147
void finalizeSwapoutFailure(StoreEntry &) override
abort the failed swapout that has been already noticed by Store
Definition: UFSSwapDir.cc:1276
uint64_t currentCount() const override
the total number of objects stored right now
Definition: UFSSwapDir.h:73
bool unlinkdUseful() const override
whether SwapDir may benefit from unlinkd
Definition: UFSSwapDir.cc:1172
int callback() override
called once every main loop iteration; TODO: Move to UFS code.
Definition: UFSSwapDir.cc:1257
void evictIfFound(const cache_key *) override
Definition: UFSSwapDir.cc:1201
UFSSwapDir(char const *aType, const char *aModuleType)
Definition: UFSSwapDir.cc:306
StoreEntry * addDiskRestore(const cache_key *key, sfileno file_number, uint64_t swap_file_sz, time_t expires, time_t timestamp, time_t lastref, time_t lastmod, uint32_t refcount, uint16_t flags, int clean)
Definition: UFSSwapDir.cc:787
void optionIODump(StoreEntry *e) const
Definition: UFSSwapDir.cc:243
int createDirectory(const char *path, int)
Definition: UFSSwapDir.cc:603
void finalizeSwapoutSuccess(const StoreEntry &) override
finalize the successful swapout that has been already noticed by Store
Definition: UFSSwapDir.cc:1269
SBuf logFile(char const *ext=nullptr) const
Definition: UFSSwapDir.cc:688
FILE * openTmpSwapLog(int *clean_flag, int *zero_flag)
Definition: UFSSwapDir.cc:858
void create() override
create system resources needed for this store to operate in the future
Definition: UFSSwapDir.cc:299
bool hasReadableEntry(const StoreEntry &) const override
Definition: UFSSwapDir.h:78
void evictCached(StoreEntry &) override
Definition: UFSSwapDir.cc:1179
void reference(StoreEntry &) override
somebody needs this entry (many cache replacement policies need to know)
Definition: UFSSwapDir.cc:523
static int * UFSDirToGlobalDirMapping
Definition: UFSSwapDir.h:127
int validFileno(sfileno filn, int flag) const
Definition: UFSSwapDir.cc:1145
void replacementRemove(StoreEntry *e)
Definition: UFSSwapDir.cc:1215
bool dereference(StoreEntry &) override
Definition: UFSSwapDir.cc:533
bool doubleCheck(StoreEntry &) override
Definition: UFSSwapDir.cc:348
void maintain() override
perform regular periodic maintenance; TODO: move to UFSSwapDir::Maintain
Definition: UFSSwapDir.cc:413
ConfigOption * getOptionTree() const override
Definition: UFSSwapDir.cc:249
StoreIOState::Pointer createStoreIO(StoreEntry &, StoreIOState::STIOCB *, void *) override
Definition: UFSSwapDir.cc:545
StoreIOState::Pointer openStoreIO(StoreEntry &, StoreIOState::STIOCB *, void *) override
Definition: UFSSwapDir.cc:551
void logEntry(const StoreEntry &e, int op) const override
Definition: UFSSwapDir.cc:1284
static bool FilenoBelongsHere(int fn, int cachedir, int level1dir, int level2dir)
Definition: UFSSwapDir.cc:1115
static int HandleCleanEvent()
safely cleans a few unused files if possible
Definition: UFSSwapDir.cc:1039
bool smpAware() const override
whether this disk storage is capable of serving multiple workers
Definition: UFSSwapDir.h:75
bool optionIOParse(char const *option, const char *value, int reconfiguring)
Definition: UFSSwapDir.cc:216
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
Definition: UFSSwapDir.cc:114
Definition: HttpRequest.h:49
Definition: Store.h:42
void STIOCB(void *their_data, int errflag, StoreIOState::Pointer self)
Definition: StoreIOState.h:39
struct Store::Disk::Flags flags
int reconfiguring
Definition: Module.h:13