47 debugs(20, 5,
"storeSwapOutStart: Begin SwapOut '" << e->
url() <<
"' to dirno " <<
79 e->
lock(
"storeSwapOutStart");
116 debugs(20, 3,
"storeSwapOut: swap_buf_len = " << swap_buf_len);
141 if (swapout_size <= 0)
173 if (!weAreOrMayBeSwappingOut)
188 debugs(20, 7,
"storeSwapOut: lowest_offset = " << lowest_offset);
204 assert(swapout_maxsize >= 0);
205 debugs(20, 7,
"storeSwapOut: swapout_size = " << swapout_maxsize);
207 if (swapout_maxsize == 0) {
281 debugs(20, 2,
"storeSwapOutFileClosed: dirno " << e->
swap_dirn <<
", swapfile " <<
283 ", errflag=" << errflag);
300 debugs(20, 3,
"storeSwapOutFileClosed: SwapOut complete: '" << e->
url() <<
"' to " <<
302 debugs(20, 5,
"swap_file_sz = " <<
321 debugs(20, 3,
"storeSwapOutFileClosed: " << __FILE__ <<
":" << __LINE__);
324 e->
unlock(
"storeSwapOutFileClosed");
342 debugs(20, 3,
" already rejected");
349 debugs(20, 3,
"already started");
354 debugs(20, 3,
"avoid heavy optional work during shutdown");
361 debugs(20, 3,
"already did");
366 if (
Store::Root().markedForDeletionAndAbandoned(*
this)) {
367 debugs(20, 3,
"marked for deletion and abandoned");
374 debugs(20, 3,
"already allowed");
382 debugs(20, 5,
"yield to entry publisher");
388 debugs(20, 3,
"not cachable");
406 debugs(20, 3,
"storeSwapOut: not Contiguous");
417 debugs(20, 7,
"expectedEnd = " << expectedEnd);
419 debugs(20, 3,
"will not fit: " << expectedEnd <<
428 debugs(20, 3,
"does not fit: " << currentEnd <<
438 debugs(20, 5,
"got " << currentEnd <<
"; defer decision for " << more <<
" more bytes");
void storeDirSwapLog(const StoreEntry *e, int op)
AsHex< Integer > asHex(const Integer n)
a helper to ease AsHex object creation
int storeTooManyDiskFilesOpen(void)
int64_t queue_offset
number of bytes sent to SwapDir for writing
Decision decision
current decision state
StoreIOState::Pointer sio
Decision
Decision states for StoreEntry::swapoutPossible() and related code.
int64_t lowestMemReaderOffset() const
int64_t availableForSwapOut() const
buffered bytes we have not swapped out yet
int64_t objectBytesOnDisk() const
int64_t expectedReplySize() const
int64_t endOffset() const
bool isContiguous() const
Store::DiskConfig cacheSwap
struct StatCounters::@113 swap
const char * getSerialisedMetaData(size_t &length) const
int unlock(const char *context)
bool hasDisk(const sdirno dirn=-1, const sfileno filen=-1) const
swap_status_t swap_status
void lock(const char *context)
bool checkDeferRead(int fd) const
void swapOutDecision(const MemObject::SwapOut::Decision &decision)
bool swappingOut() const
whether we are in the process of writing this entry to disk
Store::Disk & disk() const
the disk this entry is [being] cached on; asserts for entries w/o a disk
bool mayStartSwapOut()
whether we may start writing to disk (now or in the future)
const char * getMD5Text() const
sfileno swap_filen
unique ID inside a cache_dir for swapped out entries; -1 for others
void storeWriterDone()
called when a store writer ends its work (successfully or not)
void attachToDisk(const sdirno, const sfileno, const swap_status_t)
int64_t objectLen() const
store_status_t store_status
void releaseRequest(const bool shareable=false)
void swapOutFileClose(int how)
@ wroteAll
success: caller supplied all data it wanted to swap out
virtual bool write(char const *buf, size_t size, off_t offset, FREE *free_func)=0
void STIOCB(void *their_data, int errflag, StoreIOState::Pointer self)
void memoryOut(StoreEntry &, const bool preserveSwappable)
called to get rid of no longer needed entry data in RAM, if any
int64_t accumulateMore(StoreEntry &) const
virtual void finalizeSwapoutSuccess(const StoreEntry &)=0
finalize the successful swapout that has been already noticed by Store
virtual void finalizeSwapoutFailure(StoreEntry &)=0
abort the failed swapout that has been already noticed by Store
char * NodeGet(mem_node *aNode)
mem_node * getBlockContainingLocation(int64_t location) const
#define debugs(SECTION, LEVEL, CONTENT)
#define EBIT_TEST(flag, bit)
#define DISK_NO_SPACE_LEFT
@ RELEASE_REQUEST
prohibits making the key public
void memNodeWriteComplete(void *d)
Controller & Root()
safely access controller singleton
void storeConfigure(void)
void storeClose(StoreIOState::Pointer sio, int how)
StoreIOState::Pointer storeCreate(StoreEntry *e, StoreIOState::STIOCB *close_callback, void *callback_data)
void storeIOWrite(StoreIOState::Pointer sio, char const *buf, size_t size, off_t offset, FREE *free_func)
void storeLog(int tag, const StoreEntry *e)
static StoreIOState::STIOCB storeSwapOutFileClosed
static void xfree_cppwrapper(void *x)
static bool doPages(StoreEntry *anEntry)
static void storeSwapOutStart(StoreEntry *e)