#include <RockSwapDir.h>

Inheritance diagram for Rock::SwapDir:
Collaboration diagram for Rock::SwapDir:

Public Types

typedef RefCount< SwapDirPointer
 
typedef Ipc::StoreMap DirMap
 

Public Member Functions

 SwapDir ()
 
virtual ~SwapDir ()
 
virtual void reconfigure ()
 
virtual StoreEntryget (const cache_key *key)
 Retrieve a store entry from the store (blocking) More...
 
virtual void markForUnlink (StoreEntry &e)
 expect an unlink() call after the entry becomes idle More...
 
virtual void disconnect (StoreEntry &e)
 called when the entry is about to forget its association with cache_dir More...
 
virtual uint64_t currentSize () const
 current size More...
 
virtual uint64_t currentCount () const
 the total number of objects stored right now More...
 
virtual bool doReportStat () const
 
virtual void swappedOut (const StoreEntry &e)
 called when entry swap out is complete More...
 
virtual void create ()
 create system resources needed for this store to operate in the future More...
 
virtual void parse (int index, char *path)
 
virtual bool smpAware () const
 
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 useFreeSlot (Ipc::Mem::PageId &pageId)
 removes a slot from a list of free slots or returns false More...
 
bool validSlotId (const SlotId slotId) const
 whether the given slot ID may point to a slot in this db 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)
 
virtual void noteFreeMapSlice (const Ipc::StoreMapSliceId fileno)
 adjust slice-linked state before a locked Readable slice is erased More...
 
char const * type () const
 
virtual bool active () const
 
virtual uint64_t maxSize () const override
 
virtual uint64_t minSize () const override
 the minimum size the store will shrink to via normal housekeeping More...
 
virtual int64_t maxObjectSize () const override
 the maximum size of a storable object; -1 if unlimited More...
 
void maxObjectSize (int64_t newMax)
 
virtual void getStats (StoreInfoStats &stats) const override
 collect statistics More...
 
virtual 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...
 
RemovalPolicyrepl
 
int removals
 
int scanned
 
struct Store::Disk::Flags flags
 
CleanLogcleanLog
 
struct {
   int   blksize
 
fs
 

Protected Member Functions

virtual bool anchorCollapsed (StoreEntry &collapsed, bool &inSync)
 
virtual bool updateCollapsed (StoreEntry &collapsed)
 
virtual bool needsDiskStrand () const
 needs a dedicated kid process More...
 
virtual void init ()
 
virtual ConfigOptiongetOptionTree () const
 
virtual bool allowOptionReconfigure (const char *const option) const
 
virtual bool canStore (const StoreEntry &e, int64_t diskSpaceNeeded, int &load) const
 check whether we can store the entry; if we can, report current load More...
 
virtual StoreIOState::Pointer createStoreIO (StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *)
 
virtual StoreIOState::Pointer openStoreIO (StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *)
 
virtual void maintain ()
 purge while full(); it should be sufficient to purge just one More...
 
virtual void diskFull ()
 
virtual void reference (StoreEntry &e)
 somebody needs this entry (many cache replacement policies need to know) More...
 
virtual bool dereference (StoreEntry &e)
 
virtual void updateHeaders (StoreEntry *e)
 make stored metadata and HTTP headers the same as in the given entry More...
 
virtual bool unlinkdUseful () const
 whether SwapDir may benefit from unlinkd More...
 
virtual void unlink (StoreEntry &e)
 remove the entry from the store More...
 
virtual void statfs (StoreEntry &e) const
 
virtual void ioCompletedNotification ()
 
virtual void closeCompleted ()
 
virtual void readCompleted (const char *buf, int len, int errflag, RefCount< ::ReadRequest >)
 
virtual void writeCompleted (int errflag, size_t len, RefCount< ::WriteRequest >)
 
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...
 
void rebuild ()
 starts loading and validating stored entry metadata 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 &update, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *)
 
void anchorEntry (StoreEntry &e, const sfileno filen, const Ipc::StoreMapAnchor &anchor)
 
bool updateCollapsedWith (StoreEntry &collapsed, 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...
 
DirMapmap
 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)
 

Private Attributes

DiskIOStrategyio
 
RefCount< DiskFiletheFile
 cache storage for this cache_dir More...
 
Ipc::Mem::Pointer
< Ipc::Mem::PageStack
freeSlots
 all unused slots More...
 
Ipc::Mem::PageIdwaitingForPage
 one-page cache for a "hot" free slot More...
 
DiskFile::Config fileConfig
 file-level configuration options More...
 

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 30 of file RockSwapDir.h.

Member Typedef Documentation

typedef Ipc::StoreMap Rock::SwapDir::DirMap

Definition at line 34 of file RockSwapDir.h.

Definition at line 33 of file RockSwapDir.h.

Constructor & Destructor Documentation

Rock::SwapDir::SwapDir ( )

Definition at line 42 of file RockSwapDir.cc.

Rock::SwapDir::~SwapDir ( )
virtual

Definition at line 48 of file RockSwapDir.cc.

References safe_free.

Member Function Documentation

bool Store::Disk::active ( ) const
virtualinherited

may be used in this strand

Definition at line 236 of file Disk.cc.

References IamWorkerProcess(), and KidIdentifier.

Referenced by Store::Disks::anchorCollapsed(), and Store::Disks::get().

bool Rock::SwapDir::allowOptionReconfigure ( const char *const  option) const
protectedvirtual

Reimplemented from Store::Disk.

Definition at line 414 of file RockSwapDir.cc.

References Store::Disk::allowOptionReconfigure().

bool Rock::SwapDir::anchorCollapsed ( StoreEntry ,
bool &   
)
protectedvirtual

If this storage cannot cache collapsed entries, return false. If the entry is not found, return false. Otherwise, return true after tying the entry to this cache and setting inSync to updateCollapsed().

Reimplemented from Store::Controlled.

Definition at line 79 of file RockSwapDir.cc.

References hash_link::key.

virtual int Store::Storage::callback ( )
inlinevirtualinherited

Reimplemented in Fs::Ufs::UFSSwapDir, TestStore, Store::Controller, and Store::Disks.

Definition at line 70 of file Storage.h.

bool Store::Disk::canLog ( StoreEntry const &  e) const
inherited
bool Rock::SwapDir::canStore ( const StoreEntry e,
int64_t  diskSpaceNeeded,
int load 
) const
protectedvirtual
void Rock::SwapDir::closeCompleted ( )
protectedvirtual

Implements IORequestor.

Definition at line 846 of file RockSwapDir.cc.

References NULL.

void Store::Disk::closeLog ( )
virtualinherited

Reimplemented in Fs::Ufs::UFSSwapDir.

Definition at line 215 of file Disk.cc.

void Rock::SwapDir::create ( )
virtual

Reimplemented from Store::Disk.

Definition at line 232 of file RockSwapDir.cc.

References assert, DBG_IMPORTANT, debugs, HERE(), IamDiskProcess(), Must, O_BINARY, and UsingSmp().

Referenced by testRock::setUp().

void Rock::SwapDir::createError ( const char *const  msg)
private

Definition at line 292 of file RockSwapDir.cc.

References DBG_CRITICAL, debugs, fatal(), and xstrerr().

StoreIOState::Pointer Rock::SwapDir::createStoreIO ( StoreEntry e,
StoreIOState::STFNCB cbFile,
StoreIOState::STIOCB cbIo,
void *  data 
)
protectedvirtual

Implements Store::Disk.

Definition at line 645 of file RockSwapDir.cc.

References assert, debugs, HERE(), hash_link::key, NULL, and Ipc::StoreMapAnchor::set().

StoreIOState::Pointer Rock::SwapDir::createUpdateIO ( const Ipc::StoreMapUpdate update,
StoreIOState::STFNCB cbFile,
StoreIOState::STIOCB cbIo,
void *  data 
)
protected
uint64_t Rock::SwapDir::currentCount ( ) const
virtual

Implements Store::Storage.

Definition at line 187 of file RockSwapDir.cc.

Referenced by testRock::testRockSwapOut().

uint64_t Rock::SwapDir::currentSize ( ) const
virtual

Implements Store::Storage.

Definition at line 178 of file RockSwapDir.cc.

bool Rock::SwapDir::dereference ( StoreEntry e)
protectedvirtual

somebody no longer needs this entry (usually after calling reference()) return false iff the idle entry should be destroyed

Reimplemented from Store::Disk.

Definition at line 984 of file RockSwapDir.cc.

References debugs, HERE(), StoreEntry::repl, StoreEntry::swap_dirn, and StoreEntry::swap_filen.

void Rock::SwapDir::diskFull ( )
protectedvirtual

Notify this disk that it is full.

Todo:
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 959 of file RockSwapDir.cc.

References DBG_IMPORTANT, and debugs.

int64_t Rock::SwapDir::diskOffset ( Ipc::Mem::PageId pageId) const

Definition at line 719 of file RockSwapDir.cc.

References assert, and Ipc::Mem::PageId::number.

int64_t Rock::SwapDir::diskOffset ( int  filen) const
int64_t Rock::SwapDir::diskOffsetLimit ( ) const
protected

Definition at line 726 of file RockSwapDir.cc.

References assert.

Referenced by Rock::Rebuild::Rebuild().

bool Rock::SwapDir::doReportStat ( ) const
virtual

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 195 of file RockSwapDir.cc.

References IamDiskProcess(), and UsingSmp().

bool Store::Disk::doubleCheck ( StoreEntry )
virtualinherited

Reimplemented in Fs::Ufs::UFSSwapDir.

Definition at line 46 of file Disk.cc.

Referenced by storeCleanupDoubleCheck().

void Store::Disk::dump ( StoreEntry ) const
virtualinherited

Reimplemented in Fs::Ufs::UFSSwapDir.

Definition at line 43 of file Disk.cc.

Referenced by dump_cachedir().

void Store::Disk::dumpOptions ( StoreEntry e) const
protectedinherited

Definition at line 307 of file Disk.cc.

References ConfigOption::dump().

void Rock::SwapDir::dumpRateOption ( StoreEntry e) const
protected

Definition at line 512 of file RockSwapDir.cc.

References storeAppendPrintf().

Referenced by getOptionTree().

void Rock::SwapDir::dumpSizeOption ( StoreEntry e) const
protected

Definition at line 560 of file RockSwapDir.cc.

References PRId64, and storeAppendPrintf().

Referenced by getOptionTree().

void Rock::SwapDir::dumpTimeOption ( StoreEntry e) const
protected

Definition at line 461 of file RockSwapDir.cc.

References PRId64, and storeAppendPrintf().

Referenced by getOptionTree().

int64_t Rock::SwapDir::entryLimitAbsolute ( ) const
inline

Definition at line 57 of file RockSwapDir.h.

References SwapFilenMax.

int64_t Rock::SwapDir::entryLimitActual ( ) const

Definition at line 225 of file RockSwapDir.cc.

References min().

Referenced by Rock::Rebuild::Rebuild().

const char * Rock::SwapDir::freeSlotsPath ( ) const

Definition at line 1088 of file RockSwapDir.cc.

References String::append(), and String::termedBuf().

bool Rock::SwapDir::full ( ) const
protected

Definition at line 951 of file RockSwapDir.cc.

References NULL.

StoreEntry * Rock::SwapDir::get ( const cache_key )
virtual

Reimplemented from Store::Disk.

Definition at line 57 of file RockSwapDir.cc.

References StoreEntry::hashInsert(), and NULL.

ConfigOption * Rock::SwapDir::getOptionTree ( ) const
protectedvirtual
void Store::Disk::getStats ( StoreInfoStats stats) const
overridevirtualinherited
void Rock::SwapDir::ignoreReferences ( StoreEntry e)
protected

Definition at line 1026 of file RockSwapDir.cc.

References debugs, HERE(), and StoreEntry::repl.

void Rock::SwapDir::init ( )
protectedvirtual

Start preparing the store for use. To check readiness, callers should use readable() and writable() methods.

Implements Store::Storage.

Definition at line 301 of file RockSwapDir.cc.

References DBG_CRITICAL, debugs, fatal(), DiskIOModule::Find(), HERE(), Must, shm_old, and Store::Controller::store_dirs_rebuilding.

SBuf Rock::SwapDir::inodeMapPath ( ) const

Definition at line 1082 of file RockSwapDir.cc.

References Ipc::Mem::Segment::Name().

void Rock::SwapDir::ioCompletedNotification ( )
protectedvirtual

Implements IORequestor.

Definition at line 826 of file RockSwapDir.cc.

References debugs, fatalf(), and xstrerr().

void Store::Disk::logEntry ( const StoreEntry e,
int  op 
) const
virtualinherited

Reimplemented in Fs::Ufs::UFSSwapDir.

Definition at line 227 of file Disk.cc.

void Rock::SwapDir::maintain ( )
protectedvirtual

Reimplemented from Store::Disk.

Definition at line 967 of file RockSwapDir.cc.

void Rock::SwapDir::markForUnlink ( StoreEntry e)
virtual

Implements Store::Storage.

Definition at line 1011 of file RockSwapDir.cc.

References debugs, and StoreEntry::swap_filen.

int64_t Store::Disk::maxObjectSize ( ) const
overridevirtualinherited
void Store::Disk::maxObjectSize ( int64_t  newMax)
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.

virtual uint64_t Store::Disk::maxSize ( ) const
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.

Referenced by storeDirSelectSwapDirLeastLoad().

int64_t Store::Disk::minObjectSize ( ) const
inherited

Definition at line 96 of file Disk.cc.

References Config, SquidConfig::minObjectSize, and SquidConfig::Store.

uint64_t Store::Disk::minSize ( ) const
overridevirtualinherited

Implements Store::Storage.

Definition at line 89 of file Disk.cc.

References Config, SquidConfig::lowWaterMark, and SquidConfig::Swap.

bool Rock::SwapDir::needsDiskStrand ( ) const
protectedvirtual

Reimplemented from Store::Disk.

Definition at line 337 of file RockSwapDir.cc.

References Config, DiskIOModule::Find(), InDaemonMode(), and SquidConfig::workers.

void Rock::SwapDir::noteFreeMapSlice ( const Ipc::StoreMapSliceId  sliceId)
virtual

Implements Ipc::StoreMapCleaner.

Definition at line 763 of file RockSwapDir.cc.

References NULL, Ipc::Mem::PageId::number, and Ipc::Mem::PageId::pool.

bool Store::Disk::objectSizeIsAcceptable ( int64_t  objSize) const
inherited

whether we can store an object of the given size negative objSize means the object size is currently unknown

Definition at line 156 of file Disk.cc.

References assert.

void Store::Disk::openLog ( )
virtualinherited

Reimplemented in Fs::Ufs::UFSSwapDir.

Definition at line 212 of file Disk.cc.

void Rock::SwapDir::parse ( int  index,
char *  path 
)
virtual

Implements Store::Disk.

Definition at line 346 of file RockSwapDir.cc.

References String::append(), assert, String::termedBuf(), and xstrdup.

Referenced by testRock::setUp().

void Store::Disk::parseOptions ( int  reconfiguring)
protectedinherited
bool Rock::SwapDir::parseRateOption ( char const *  option,
const char *  value,
int  reconfiguring 
)
protected

Definition at line 470 of file RockSwapDir.cc.

References DBG_CRITICAL, DBG_IMPORTANT, debugs, NULL, self_destruct(), and strtoll().

Referenced by getOptionTree().

void Rock::SwapDir::parseSize ( const bool  reconfiguring)
protected

parse maximum db disk size

Definition at line 378 of file RockSwapDir.cc.

References DBG_IMPORTANT, debugs, fatal(), GetInteger(), and i.

bool Rock::SwapDir::parseSizeOption ( char const *  option,
const char *  value,
int  reconfiguring 
)
protected

Definition at line 520 of file RockSwapDir.cc.

References DBG_CRITICAL, DBG_IMPORTANT, debugs, NULL, self_destruct(), and strtoll().

Referenced by getOptionTree().

bool Rock::SwapDir::parseTimeOption ( char const *  option,
const char *  value,
int  reconfiguring 
)
protected

Definition at line 422 of file RockSwapDir.cc.

References DBG_CRITICAL, DBG_IMPORTANT, debugs, NULL, self_destruct(), and strtoll().

Referenced by getOptionTree().

void Rock::SwapDir::purgeSome ( )
virtual void IORequestor::readCompleted ( const char *  buf,
int  len,
int  errflag,
RefCount< ReadRequest  
)
pure virtualinherited
void Rock::SwapDir::readCompleted ( const char *  buf,
int  len,
int  errflag,
RefCount< ::ReadRequest r 
)
protectedvirtual
void Rock::SwapDir::rebuild ( )
protected

Definition at line 609 of file RockSwapDir.cc.

References AsyncJob::Start().

void Rock::SwapDir::reconfigure ( )
virtual

Implements Store::Disk.

Definition at line 368 of file RockSwapDir.cc.

void Rock::SwapDir::reference ( StoreEntry e)
protectedvirtual

Reimplemented from Store::Disk.

Definition at line 976 of file RockSwapDir.cc.

References debugs, HERE(), StoreEntry::repl, StoreEntry::swap_dirn, and StoreEntry::swap_filen.

int64_t Store::Disk::sizeInBlocks ( const int64_t  size) const
inlineprotectedinherited

Definition at line 81 of file Disk.h.

References Store::Disk::fs.

int64_t Rock::SwapDir::slotLimitAbsolute ( ) const

Definition at line 207 of file RockSwapDir.cc.

References assert, and max().

int64_t Rock::SwapDir::slotLimitActual ( ) const

Definition at line 216 of file RockSwapDir.cc.

References max(), and min().

Referenced by Rock::Rebuild::Rebuild().

virtual bool Rock::SwapDir::smpAware ( ) const
inlinevirtual

whether this storage is capable of serving multiple workers; a true result does not imply [lack of] non-SMP support because [only] some SMP-aware storages also support non-SMP configss

Reimplemented from Store::Disk.

Definition at line 50 of file RockSwapDir.h.

void Store::Disk::stat ( StoreEntry e) const
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(), and type.

void Rock::SwapDir::statfs ( StoreEntry e) const
protectedvirtual
void Rock::SwapDir::swappedOut ( const StoreEntry e)
virtual

Implements Store::Disk.

Definition at line 201 of file RockSwapDir.cc.

virtual void Store::Storage::sync ( void  )
inlinevirtualinherited

Reimplemented in Fs::Ufs::UFSSwapDir, Store::Controller, and Store::Disks.

Definition at line 76 of file Storage.h.

void Rock::SwapDir::trackReferences ( StoreEntry e)
protected

Definition at line 1018 of file RockSwapDir.cc.

References debugs, HERE(), and StoreEntry::repl.

char const * Store::Disk::type ( ) const
inherited

Definition at line 230 of file Disk.cc.

Referenced by dump_cachedir(), and parse_cachedir().

void Rock::SwapDir::unlink ( StoreEntry e)
protectedvirtual

Implements Store::Storage.

Definition at line 1002 of file RockSwapDir.cc.

References debugs, HERE(), and StoreEntry::swap_filen.

bool Rock::SwapDir::unlinkdUseful ( ) const
protectedvirtual

Implements Store::Disk.

Definition at line 995 of file RockSwapDir.cc.

bool Rock::SwapDir::updateCollapsed ( StoreEntry )
protectedvirtual

Update a local collapsed entry with fresh info from this cache (if any). Return true iff the cache supports collapsed entries and the given local collapsed entry is now in sync with this storage.

Reimplemented from Store::Controlled.

Definition at line 96 of file RockSwapDir.cc.

References assert, StoreEntry::swap_dirn, and StoreEntry::swap_filen.

bool Rock::SwapDir::updateCollapsedWith ( StoreEntry collapsed,
const Ipc::StoreMapAnchor anchor 
)
protected
void Rock::SwapDir::updateHeaders ( StoreEntry )
protectedvirtual

Reimplemented from Store::Controlled.

Definition at line 933 of file RockSwapDir.cc.

References debugs, AsyncJob::Start(), and StoreEntry::swap_filen.

void Rock::SwapDir::updateHeadersOrThrow ( Ipc::StoreMapUpdate update)
protected
bool Rock::SwapDir::useFreeSlot ( Ipc::Mem::PageId pageId)

Definition at line 733 of file RockSwapDir.cc.

References assert, debugs, NULL, and Ipc::Mem::PageId::set().

void Rock::SwapDir::validateOptions ( )
protected

check the results of the configuration; only level-0 debugging works here

Definition at line 567 of file RockSwapDir.cc.

References DBG_CRITICAL, debugs, fatal(), and max().

bool Rock::SwapDir::validSlotId ( const SlotId  slotId) const

Definition at line 757 of file RockSwapDir.cc.

void Store::Disk::writeCleanDone ( )
virtualinherited

Reimplemented in Fs::Ufs::UFSSwapDir.

Definition at line 224 of file Disk.cc.

int Store::Disk::writeCleanStart ( )
virtualinherited

Reimplemented in Fs::Ufs::UFSSwapDir.

Definition at line 218 of file Disk.cc.

Referenced by storeDirWriteCleanLogs().

virtual void IORequestor::writeCompleted ( int  errflag,
size_t  len,
RefCount< WriteRequest  
)
pure virtualinherited

Friends And Related Function Documentation

friend class HeaderUpdater
friend

Definition at line 131 of file RockSwapDir.h.

friend class IoState
friend

Definition at line 130 of file RockSwapDir.h.

friend class Rebuild
friend

Definition at line 129 of file RockSwapDir.h.

Member Data Documentation

int Store::Disk::blksize
inherited

Definition at line 140 of file Disk.h.

CleanLog* Store::Disk::cleanLog
inherited

Definition at line 134 of file Disk.h.

Referenced by storeDirWriteCleanLogs(), and UFSCleanLog::write().

int Store::Disk::disker
inherited

Definition at line 98 of file Disk.h.

Referenced by configDoConfigure().

DiskFile::Config Rock::SwapDir::fileConfig
private

Definition at line 144 of file RockSwapDir.h.

const char* Rock::SwapDir::filePath
protected

Definition at line 132 of file RockSwapDir.h.

struct Store::Disk::Flags Store::Disk::flags
inherited
Ipc::Mem::Pointer<Ipc::Mem::PageStack> Rock::SwapDir::freeSlots
private

Definition at line 140 of file RockSwapDir.h.

struct { ... } Store::Disk::fs
const int64_t Rock::SwapDir::HeaderSize = 16*1024
staticprivate

Definition at line 146 of file RockSwapDir.h.

Referenced by Rock::Rebuild::start().

int Store::Disk::index
inherited

Definition at line 97 of file Disk.h.

Referenced by storeDirWriteCleanLogs(), and Fs::Ufs::UFSStoreState::UFSStoreState().

DiskIOStrategy* Rock::SwapDir::io
private

Definition at line 138 of file RockSwapDir.h.

DirMap* Rock::SwapDir::map
protected

Definition at line 133 of file RockSwapDir.h.

int64_t Store::Disk::max_objsize
protectedinherited

Definition at line 93 of file Disk.h.

uint64_t Store::Disk::max_size
protectedinherited

Definition at line 91 of file Disk.h.

Referenced by Store::Disk::maxSize().

int64_t Store::Disk::min_objsize
protectedinherited

Definition at line 92 of file Disk.h.

char* Store::Disk::path
inherited

Definition at line 96 of file Disk.h.

Referenced by Fs::Ufs::UFSSwapDir::DirClean(), dump_cachedir(), and parse_cachedir().

int Store::Disk::removals
inherited

Definition at line 100 of file Disk.h.

RemovalPolicy* Store::Disk::repl
inherited

Definition at line 99 of file Disk.h.

int Store::Disk::scanned
inherited

Definition at line 101 of file Disk.h.

uint64_t Rock::SwapDir::slotSize

Definition at line 76 of file RockSwapDir.h.

Referenced by Rock::Rebuild::Rebuild().

RefCount<DiskFile> Rock::SwapDir::theFile
private

Definition at line 139 of file RockSwapDir.h.

Ipc::Mem::PageId* Rock::SwapDir::waitingForPage
private

Definition at line 141 of file RockSwapDir.h.


The documentation for this class was generated from the following files:

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors