UFSSwapDir.h
Go to the documentation of this file.
59 virtual StoreIOState::Pointer createStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override;
60 virtual StoreIOState::Pointer openStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override;
Definition: UFSStrategy.h:25
void optionIODump(StoreEntry *e) const
Definition: UFSSwapDir.cc:244
void replacementRemove(StoreEntry *e)
Definition: UFSSwapDir.cc:1216
Definition: DiskIOModule.h:21
virtual void evictCached(StoreEntry &) override
Definition: UFSSwapDir.cc:1180
bool pathIsDirectory(const char *path) const
Definition: UFSSwapDir.cc:629
SBuf logFile(char const *ext=nullptr) const
Definition: UFSSwapDir.cc:689
virtual void logEntry(const StoreEntry &e, int op) const override
Definition: UFSSwapDir.cc:1285
static bool FilenoBelongsHere(int fn, int cachedir, int level1dir, int level2dir)
Definition: UFSSwapDir.cc:1116
virtual bool smpAware() const override
whether this disk storage is capable of serving multiple workers
Definition: UFSSwapDir.h:75
static int * UFSDirToGlobalDirMapping
Definition: UFSSwapDir.h:127
virtual void statfs(StoreEntry &) const override
Definition: UFSSwapDir.cc:371
virtual void parse(int index, char *path) override
Definition: UFSSwapDir.cc:180
struct Store::Disk::Flags flags
Definition: HttpRequest.h:49
Definition: ConfigOption.h:58
virtual void create() override
create system resources needed for this store to operate in the future
Definition: UFSSwapDir.cc:300
void STFNCB(void *their_data, int errflag, StoreIOState::Pointer self)
Definition: StoreIOState.h:41
FILE * openTmpSwapLog(int *clean_flag, int *zero_flag)
Definition: UFSSwapDir.cc:859
int validFileno(sfileno filn, int flag) const
Definition: UFSSwapDir.cc:1146
virtual int callback() override
called once every main loop iteration; TODO: Move to UFS code.
Definition: UFSSwapDir.cc:1258
virtual StoreIOState::Pointer createStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override
Definition: UFSSwapDir.cc:546
bool optionIOParse(char const *option, const char *value, int reconfiguring)
Definition: UFSSwapDir.cc:217
virtual 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:115
virtual void finalizeSwapoutSuccess(const StoreEntry &) override
finalize the successful swapout that has been already noticed by Store
Definition: UFSSwapDir.cc:1270
virtual bool hasReadableEntry(const StoreEntry &) const override
Definition: UFSSwapDir.h:78
virtual ConfigOption * getOptionTree() const override
Definition: UFSSwapDir.cc:250
int reconfiguring
virtual void evictIfFound(const cache_key *) override
Definition: UFSSwapDir.cc:1202
virtual void writeCleanDone() override
Definition: UFSSwapDir.cc:977
virtual void maintain() override
perform regular periodic maintenance; TODO: move to UFSSwapDir::Maintain
Definition: UFSSwapDir.cc:414
virtual bool unlinkdUseful() const override
whether SwapDir may benefit from unlinkd
Definition: UFSSwapDir.cc:1173
int createDirectory(const char *path, int)
Definition: UFSSwapDir.cc:604
virtual void reference(StoreEntry &) override
somebody needs this entry (many cache replacement policies need to know)
Definition: UFSSwapDir.cc:524
virtual bool doubleCheck(StoreEntry &) override
Definition: UFSSwapDir.cc:349
virtual StoreIOState::Pointer openStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override
Definition: UFSSwapDir.cc:552
void STIOCB(void *their_data, int errflag, StoreIOState::Pointer self)
Definition: StoreIOState.h:51
Definition: Store.h:42
Definition: Module.h:13
virtual uint64_t currentCount() const override
the total number of objects stored right now
Definition: UFSSwapDir.h:73
UFSSwapDir(char const *aType, const char *aModuleType)
Definition: UFSSwapDir.cc:307
Definition: FileMap.h:24
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:788
ConfigOptionVector * currentIOOptions
Definition: UFSSwapDir.h:147
virtual int writeCleanStart() override
Definition: UFSSwapDir.cc:933
Definition: ConfigOption.h:68
virtual void dump(StoreEntry &) const override
Definition: UFSSwapDir.cc:1230
Definition: UFSSwapDir.h:31
virtual bool dereference(StoreEntry &) override
Definition: UFSSwapDir.cc:534
virtual void finalizeSwapoutFailure(StoreEntry &) override
abort the failed swapout that has been already noticed by Store
Definition: UFSSwapDir.cc:1277
static int HandleCleanEvent()
safely cleans a few unused files if possible
Definition: UFSSwapDir.cc:1040