9#ifndef SQUID_SRC_FS_ROCK_ROCKIOSTATE_H
10#define SQUID_SRC_FS_ROCK_ROCKIOSTATE_H
40 void close(
int how)
override;
uint64_t repliesReceived
the number of successful responses we received from theFile
bool write(char const *buf, size_t size, off_t offset, FREE *free_func) override
wraps tryWrite() to handle deep write failures centrally and safely
const Ipc::StoreMapSlice & currentReadableSlice() const
convenience wrapper returning the map slot we are reading now
void writeToDisk()
write what was buffered during write() calls
const Ipc::StoreMapAnchor & readAnchor() const
SlotId splicingPoint
the last db slot successfully read or written
bool expectedReply(const IoXactionId receivedId)
Rock::SwapDir::Pointer dir
swap dir that initiated I/O
void callBack(int errflag)
void read_(char *buf, size_t size, off_t offset, STRCB *callback, void *callback_data) override
size_t writeToBuffer(char const *buf, size_t size)
RefCount< IoState > Pointer
Ipc::StoreMapAnchor * writeableAnchor_
starting point for writing
int64_t objOffset
object offset for current db slot
SlotId staleSplicingPointNext
void file(const RefCount< DiskFile > &aFile)
void callReaderBack(const char *buf, int rlen)
report (already sanitized/checked) I/O results to the read initiator
void finishedWriting(const int errFlag)
called by SwapDir::writeCompleted() after the last write and on error
Ipc::StoreMapAnchor & writeAnchor()
void tryWrite(char const *buf, size_t size, off_t offset)
const size_t slotSize
db cell size
const Ipc::StoreMapAnchor * readableAnchor_
starting point for reading
RefCount< DiskFile > theFile
bool stillWaiting() const
whether we are still waiting for the I/O results (i.e., not closed)
void handleReadCompletion(Rock::ReadRequest &request, const int rlen, const int errFlag)
forwards read data (or an error) to the reader that initiated this I/O
uint64_t requestsSent
the number of read or write requests we sent to theFile
void close(int how) override
finish or abort swapping per CloseHow
void STRCB(void *their_data, const char *buf, ssize_t len, StoreIOState::Pointer self)
void STIOCB(void *their_data, int errflag, StoreIOState::Pointer self)
manages a single cache_dir
uint64_t IoXactionId
unique (within a given IoState object scope) I/O transaction identifier
sfileno SlotId
db cell number, starting with cell 0 (always occupied by the db header)