#include <VestaSource.H>
Inheritance diagram for VestaSource:
Public Types | |
typedef bool(* | listCallback )(void *closure, typeTag type, Arc arc, unsigned int index, Bit32 pseudoInode, ShortId fileSid, bool master) |
enum | dupeCheck { dontReplace = 0, replaceDiff, replaceNonMaster } |
enum | typeTag { immutableFile = 0, mutableFile, immutableDirectory, appendableDirectory, mutableDirectory, ghost, stub, deleted, outdated, volatileDirectory, evaluatorDirectory, device, volatileROEDirectory, evaluatorROEDirectory, gap, unused = 15 } |
Public Member Functions | |
virtual void | resync (AccessControl::Identity who=NULL) throw (SRPC::failure) |
VestaSource * | getParent () throw (SRPC::failure) |
virtual errorCode | read (void *buffer, int *nbytes, Basics::uint64 offset, AccessControl::Identity who=NULL) throw (SRPC::failure) |
virtual errorCode | readWhole (std::ostream &out, AccessControl::Identity who=NULL) throw (SRPC::failure) |
virtual bool | executable () throw (SRPC::failure) |
virtual Basics::uint64 | size () throw (SRPC::failure) |
virtual errorCode | write (const void *buffer, int *nbytes, Basics::uint64 offset, AccessControl::Identity who=NULL) throw (SRPC::failure) |
virtual errorCode | setExecutable (bool x, AccessControl::Identity who=NULL) throw (SRPC::failure) |
virtual errorCode | setSize (Basics::uint64 s, AccessControl::Identity who=NULL) throw (SRPC::failure) |
virtual time_t | timestamp () throw (SRPC::failure) |
virtual errorCode | setTimestamp (time_t ts, AccessControl::Identity who=NULL) throw (SRPC::failure) |
virtual ShortId | shortId () throw (SRPC::failure) |
virtual errorCode | lookup (Arc arc, VestaSource *&result, AccessControl::Identity who=NULL, unsigned int indexOffset=0) throw (SRPC::failure) |
virtual errorCode | lookupPathname (const char *pathname, VestaSource *&result, AccessControl::Identity who=NULL, char pathnameSep=PathnameSep) throw (SRPC::failure) |
virtual errorCode | lookupIndex (unsigned int index, VestaSource *&result, char *arcbuf=NULL) throw (SRPC::failure) |
virtual errorCode | reallyDelete (Arc arc, AccessControl::Identity who=NULL, bool existCheck=true, time_t timestamp=0) throw (SRPC::failure) |
virtual errorCode | insertFile (Arc arc, ShortId sid, bool master, AccessControl::Identity who=NULL, dupeCheck chk=dontReplace, VestaSource **newvs=NULL, time_t timestamp=0, FP::Tag *fptag=NULL) throw (SRPC::failure) |
virtual errorCode | insertMutableFile (Arc arc, ShortId sid, bool master, AccessControl::Identity who=NULL, dupeCheck chk=dontReplace, VestaSource **newvs=NULL, time_t timestamp=0) throw (SRPC::failure) |
virtual errorCode | insertImmutableDirectory (Arc arc, VestaSource *dir, bool master, AccessControl::Identity who=NULL, dupeCheck chk=dontReplace, VestaSource **newvs=NULL, time_t timestamp=0, FP::Tag *fptag=NULL) throw (SRPC::failure) |
virtual errorCode | insertAppendableDirectory (Arc arc, bool master, AccessControl::Identity who=NULL, dupeCheck chk=dontReplace, VestaSource **newvs=NULL, time_t timestamp=0) throw (SRPC::failure) |
virtual errorCode | insertMutableDirectory (Arc arc, VestaSource *dir, bool master, AccessControl::Identity who=NULL, dupeCheck chk=dontReplace, VestaSource **newvs=NULL, time_t timestamp=0) throw (SRPC::failure) |
virtual errorCode | insertGhost (Arc arc, bool master, AccessControl::Identity who=NULL, dupeCheck chk=dontReplace, VestaSource **newvs=NULL, time_t timestamp=0) throw (SRPC::failure) |
virtual errorCode | insertStub (Arc arc, bool master, AccessControl::Identity who=NULL, dupeCheck chk=dontReplace, VestaSource **newvs=NULL, time_t timestamp=0) throw (SRPC::failure) |
virtual errorCode | renameTo (Arc arc, VestaSource *fromDir, Arc fromArc, AccessControl::Identity who=NULL, dupeCheck chk=dontReplace, time_t timestamp=0) throw (SRPC::failure) |
virtual errorCode | list (unsigned int firstIndex, listCallback callback, void *closure, AccessControl::Identity who=NULL, bool deltaOnly=false, unsigned int indexOffset=0) |
virtual errorCode | getBase (VestaSource *&result, AccessControl::Identity who=NULL) throw (SRPC::failure) |
virtual errorCode | makeMutable (VestaSource *&result, ShortId sid=NullShortId, Basics::uint64 copyMax=(Basics::uint64)-1, AccessControl::Identity who=NULL) throw (SRPC::failure) |
virtual errorCode | copyToMutable (VestaSource *&result, AccessControl::Identity who=NULL) throw (SRPC::failure) |
virtual errorCode | makeFilesImmutable (unsigned int threshold, AccessControl::Identity who=NULL) throw (SRPC::failure) |
virtual errorCode | setMaster (bool state, AccessControl::Identity who=NULL) throw (SRPC::failure) |
virtual errorCode | setIndexMaster (unsigned int index, bool state, AccessControl::Identity who=NULL) throw (SRPC::failure) |
virtual Text | host () throw () |
virtual Text | port () throw () |
virtual errorCode | cedeMastership (const char *requestid, const char **grantidOut, AccessControl::Identity who=NULL) throw (SRPC::failure) |
virtual bool | hasName () throw () |
virtual void | setHasName (bool val) throw () |
virtual bool | visited () throw () |
virtual void | setVisited (bool val) throw () |
virtual void | mark (bool byName=true, ArcTable *hidden=NULL) throw () |
virtual void | freeTree () throw () |
virtual Bit32 | checkpoint (Bit32 &nextSP, std::fstream &ckpt) throw () |
Bit32 | indexToPseudoInode (unsigned int index) throw () |
VRErrorCode::errorCode | setAttrib (const char *name, const char *value, AccessControl::Identity who=NULL, time_t timestamp=0) throw (SRPC::failure) |
VRErrorCode::errorCode | clearAttrib (const char *name, AccessControl::Identity who=NULL, time_t timestamp=0) throw (SRPC::failure) |
VRErrorCode::errorCode | addAttrib (const char *name, const char *value, AccessControl::Identity who=NULL, time_t timestamp=0) throw (SRPC::failure) |
VRErrorCode::errorCode | removeAttrib (const char *name, const char *value, AccessControl::Identity who=NULL, time_t timestamp=0) throw (SRPC::failure) |
virtual errorCode | writeAttrib (attribOp op, const char *name, const char *value, AccessControl::Identity who=NULL, time_t timestamp=0) throw (SRPC::failure) |
virtual errorCode | measureDirectory (directoryStats &result, AccessControl::Identity who=NULL) throw (SRPC::failure) |
virtual errorCode | collapseBase (AccessControl::Identity who=NULL) throw (SRPC::failure) |
virtual unsigned int | linkCount () |
virtual VestaSource * | copy () throw () |
virtual | ~VestaSource () |
Static Public Member Functions | |
static const char * | errorCodeString (errorCode err) throw () |
static const char * | typeTagString (typeTag type) throw () |
static char | typeTagChar (typeTag type) throw () |
static VestaSource * | repositoryRoot (LongId::lockKindTag lockKind=LongId::noLock, ReadersWritersLock **lock=NULL) throw (SRPC::failure) |
static VestaSource * | mutableRoot (LongId::lockKindTag lockKind=LongId::noLock, ReadersWritersLock **lock=NULL) throw (SRPC::failure) |
static VestaSource * | volatileRoot (LongId::lockKindTag lockKind=LongId::noLock, ReadersWritersLock **lock=NULL) throw (SRPC::failure) |
static void | init () throw () |
static void | recoveryDone () throw () |
Public Attributes | |
typeTag | type |
LongId | longid |
bool | master |
Bit32 | pseudoInode |
FP::Tag | fptag |
AccessControl | ac |
Bit8 * | rep |
Static Public Attributes | |
static bool | doLogging = false |
Classes | |
struct | directoryStats |
|
Definition at line 442 of file VestaSource.H. |
|
Definition at line 185 of file VestaSource.H. |
|
Definition at line 194 of file VestaSource.H. |
|
Definition at line 674 of file VestaSource.H. |
|
Definition at line 612 of file VestaSource.H. Referenced by apply_sattr(), and main(). |
|
Reimplemented in VDirSurrogate. Definition at line 1144 of file Mastership.C. References appendableDirectory, Text::cchars(), VestaLog::commit(), DBG_MASTERSHIP, Repos::dprintf(), Text::Empty(), VRErrorCode::invalidArgs, LongId::isAncestorOf(), Repos::isDebugLevel(), Text::Length(), HintsClosure::list, MastershipAccessCheck(), NEW_PTRFREE_ARRAY, VRErrorCode::noPermission, VRErrorCode::notMaster, HintsClosure::now, HintsClosure::nowtxt, VRErrorCode::ok, AccessControl::ownership, Repos::pr_nfs_fh(), RootLongId, VestaLog::start(), VRLog, and HintsClosure::vs. Referenced by AcquireMastership(). |
|
Reimplemented in VDirChangeable, VDirEvaluator, and VDirVolatileRoot. Definition at line 506 of file VestaSourceCommon.C. Referenced by VMemPool::writeCheckpoint(). |
|
Definition at line 606 of file VestaSource.H. |
|
Reimplemented in VDirChangeable, and VDirSurrogate. Definition at line 603 of file VestaSourceCommon.C. References VRErrorCode::inappropriateOp. Referenced by main(). |
|
Reimplemented in VDirChangeable, VDirSurrogate, and VDirVolatileRoot. Definition at line 614 of file VestaSourceCommon.C. |
|
Definition at line 132 of file VDirSurrogateOnly.C. References VRErrorCode::inappropriateOp. Referenced by do_setattr(), and WriteAttribStep::execute(). |
|
Definition at line 538 of file VestaSourceCommon.C. Referenced by AcquireMastership(), ReposUI::errorCodeText(), operator<<(), Replicate(), ReplicateAttribs(), RunTool(), test_thread(), and vsToFilename(). |
|
Reimplemented in VDirSurrogate, and VLeaf. Definition at line 268 of file VestaSourceCommon.C. Referenced by VSStat(). |
|
Reimplemented in VDirChangeable, and VDirEvaluator. Definition at line 513 of file VestaSourceCommon.C. |
|
Reimplemented in VDirChangeable, and VDirSurrogate. Definition at line 423 of file VestaSourceCommon.C. Referenced by test_thread(). |
|
Definition at line 149 of file VDirSurrogateOnly.C. References LongId::getParent(), longid, VDirSurrogate::LongIdLookup(), NullLongId, and port(). Referenced by ReposUI::getMasterHintDir(), ReposUI::prevVersion(), upToVersion(), and upToWorkingDir(). |
|
Reimplemented in VDirChangeable, and VDirEvaluator. Definition at line 474 of file VestaSourceCommon.C. |
|
Reimplemented in VDirSurrogate. Definition at line 583 of file VestaSourceCommon.C. References VDirSurrogate::defaultHost(). Referenced by main(), ReplicateMissing(), RecursiveStats::visit(), and ReposUI::vsToFilename(). |
|
Definition at line 586 of file VestaSource.H. Referenced by VDCLookupResult(). |
|
Reimplemented in VDirVolatileRoot. Definition at line 951 of file VestaSource.C. References ac, appendableDirectory, VestaAttribs::attribs, doLogging, fptag, AccessControl::group, VDirVolatileRoot::init(), InitVRWeed(), longid, master, AccessControl::mode, mutableDirectory, mutableRoot(), MutableRootLongId, NEW, NEW_CONSTR, AccessControl::owner, pathnameFPTag, pseudoInode, RegisterRecoveryCallback(), repositoryRoot(), RootLongId, type, volatileDirectory, volatileRoot(), and VolatileRootLongId. Referenced by main(). |
|
Definition at line 374 of file VestaSourceCommon.C. Referenced by do_mkdir(), InsertAppendableDirectoryStep::execute(), ReposUI::lookupCreatePath(), and test_thread(). |
|
Definition at line 344 of file VestaSourceCommon.C. Referenced by do_hardlink(), and InsertFileStep::execute(). |
|
Definition at line 395 of file VestaSourceCommon.C. Referenced by do_remove(), InsertGhostStep::execute(), main(), and test_thread(). |
|
Definition at line 364 of file VestaSourceCommon.C. Referenced by InsertImmutableDirectoryStep::execute(), and test_thread(). |
|
Definition at line 384 of file VestaSourceCommon.C. Referenced by do_mkdir(), InsertMutableDirectoryStep::execute(), Replicate(), and test_thread(). |
|
Definition at line 354 of file VestaSourceCommon.C. Referenced by CreateDerived(), do_create(), do_hardlink(), and InsertMutableFileStep::execute(). |
|
Definition at line 404 of file VestaSourceCommon.C. Referenced by do_symlink(), InsertStubStep::execute(), and test_thread(). |
|
Reimplemented in VLeaf. Definition at line 609 of file VestaSourceCommon.C. Referenced by file_fattr(). |
|
Reimplemented in VDirChangeable, VDirEvaluator, VDirSurrogate, and VDirVolatileRoot. Definition at line 431 of file VestaSourceCommon.C. Referenced by AddToNewStuff(), ReposUI::cleanup(), do_readdir(), do_readlink(), do_remove(), FileEC::Eval(), VDirChangeable::list(), main(), ReplicationCleanup(), RunTool(), test_thread(), and RecursiveStats::visitDir(). |
|
Reimplemented in VDirChangeable, VDirEvaluator, VDirSurrogate, and VDirVolatileRoot. Definition at line 324 of file VestaSourceCommon.C. Referenced by AddToNewStuff(), do_create(), do_getattr(), do_hardlink(), do_lookup(), do_mkdir(), do_remove(), do_rename(), do_setattr(), do_symlink(), LookupStep::execute(), VDirChangeable::insertCommon(), VDirChangeable::list(), VDirChangeable::lookup(), ReposUI::lookupCreatePath(), main(), OpenSource(), VDirChangeable::reallyDelete(), VDirChangeable::renameTo(), Replicate(), ReplicationCleanup(), and test_thread(). |
|
Reimplemented in VDirChangeable, VDirEvaluator, VDirSurrogate, and VDirVolatileRoot. Definition at line 440 of file VestaSourceCommon.C. Referenced by VDirChangeable::copyIndexToMutable(), do_remove(), LookupIndexStep::execute(), VDirChangeable::lookupIndex(), VDirChangeable::makeIndexMutable(), visitDirEntriesCallback(), RecursiveStats::visitFile(), ReposUI::vsToFilename(), and vsToFilename(). |
|
Reimplemented in VDirSurrogate. Definition at line 114 of file VDirSurrogateOnly.C. References VRErrorCode::inappropriateOp. Referenced by AcquireMastership(), LookupPathnameStep::execute(), ReposUI::filenameToVS(), LookupPath(), main(), Replicate(), ReplicateAttribs(), and test_thread(). |
|
Reimplemented in VDirSurrogate. Definition at line 141 of file VDirSurrogateOnly.C. References VRErrorCode::inappropriateOp. Referenced by MakeFilesImmutableStep::execute(), main(), MakeFilesImmutable(), and RunTool(). |
|
Reimplemented in VDirSurrogate. Definition at line 123 of file VDirSurrogateOnly.C. References VRErrorCode::inappropriateOp. Referenced by do_cow(), do_create(), do_hardlink(), do_mkdir(), do_remove(), do_rename(), main(), and test_thread(). |
|
Reimplemented in VDirChangeable, VDirEvaluator, and VDirVolatileRoot. Definition at line 500 of file VestaSourceCommon.C. |
|
Reimplemented in VDirChangeable, and VDirSurrogate. Definition at line 595 of file VestaSourceCommon.C. References VRErrorCode::inappropriateOp. Referenced by process(), and RecursiveStats::visitDir(). |
|
Definition at line 92 of file VDirSurrogateOnly.C. References LongId::noLock, and VDirSurrogate_init2(). Referenced by ReposUI::filenameToVS(), init(), VestaAttribsRep::markCallback(), VDirChangeable::markCallback(), MutableSidrefCheck(), MutableSidrefInit(), VMemPool::readCheckpoint(), recoveryDone(), Replicate(), ReplicationCleanup(), test_thread(), and VMemPool::writeCheckpoint(). |
|
Reimplemented in VDirSurrogate. Definition at line 589 of file VestaSourceCommon.C. References VDirSurrogate::defaultPort(). Referenced by getParent(), main(), ReplicateMissing(), RecursiveStats::visit(), and ReposUI::vsToFilename(). |
|
Reimplemented in VDirSurrogate, and VLeaf. Definition at line 253 of file VestaSourceCommon.C. Referenced by ParseImports::RemoteModelSpace::getC(), and VSRead(). |
|
Reimplemented in VDirSurrogate. Definition at line 261 of file VestaSourceCommon.C. |
|
Reimplemented in VDirChangeable, and VDirSurrogate. Definition at line 335 of file VestaSourceCommon.C. Referenced by do_remove(), ReallyDeleteStep::execute(), main(), Replicate(), and test_thread(). |
|
Definition at line 1013 of file VestaSource.C. References VestaLog::commit(), doLogging, mutableRoot(), MutableSidrefInit(), MutableSidrefRecoveryCheck(), VestaAttribs::opSet, VestaLog::put(), repositoryRoot(), resync(), AccessControl::runtoolUser, VestaLog::start(), Basics::OBufStream::str(), AccessControl::vadminGroup, volatileRoot(), VRLogVersion, and writeAttrib(). Referenced by main(). |
|
Definition at line 619 of file VestaSource.H. Referenced by apply_sattr(). |
|
Definition at line 413 of file VestaSourceCommon.C. Referenced by do_rename(), and RenameToStep::execute(). |
|
Definition at line 81 of file VDirSurrogateOnly.C. References LongId::noLock, and VDirSurrogate_init2(). Referenced by AcquireMastership(), ReposUI::filenameToVS(), init(), main(), VestaAttribsRep::markCallback(), VDirChangeable::markCallback(), GatherWeedRoots::P(), VMemPool::readCheckpoint(), recoveryDone(), Replicate(), ReplicateAttribs(), ReposRoots::Scan(), test_thread(), VUpdateInit::VUpdateInit(), and VMemPool::writeCheckpoint(). |
|
Reimplemented in VDirChangeable, VDirSurrogate, and VDirVolatileRoot. Definition at line 308 of file VestaSourceCommon.C. Referenced by ResyncStep::execute(), VDirSurrogate::mutableRoot(), VMemPool::readCheckpoint(), recoveryDone(), VDirSurrogate::repositoryRoot(), test_thread(), and VDirSurrogate::volatileRoot(). |
|
|
Reimplemented in VDirSurrogate, and VLeaf. Definition at line 293 of file VestaSourceCommon.C. Referenced by VSSetExecutable(). |
|
Reimplemented in VDirChangeable, and VDirEvaluator. Definition at line 481 of file VestaSourceCommon.C. |
|
Reimplemented in VDirChangeable, and VDirSurrogate. Definition at line 450 of file VestaSourceCommon.C. Referenced by SetIndexMaster(), and setMaster(). |
|
Reimplemented in VDirSurrogate. Definition at line 568 of file VestaSourceCommon.C. References VRErrorCode::notFound, VRErrorCode::ok, and setIndexMaster(). Referenced by SetMasterStep::execute(). |
|
Reimplemented in VDirSurrogate, and VLeaf. Definition at line 301 of file VestaSourceCommon.C. Referenced by VSSetSize(). |
|
Reimplemented in VDirChangeable, VDirSurrogate, and VLeaf. Definition at line 467 of file VestaSourceCommon.C. Referenced by apply_sattr(), SetTimestampStep::execute(), and VSSetTimestamp(). |
|
Reimplemented in VDirChangeable, and VDirEvaluator. Definition at line 494 of file VestaSourceCommon.C. Referenced by VDirChangeable::mark(). |
|
Reimplemented in VDirChangeable, VDirSurrogate, and VLeaf. Definition at line 316 of file VestaSourceCommon.C. References NullShortId. Referenced by AddToNewStuff(), any_fattr(), apply_sattr(), VDirChangeable::copyIndexToMutable(), CreateDerived(), do_cow(), do_hardlink(), do_readlink(), fd_inactive(), fh_fd(), OpenSource(), VDirChangeable::renameTo(), test_thread(), TextVC::TextC::TextC(), VDCLookupResult(), and RecursiveStats::visitDir(). |
|
Reimplemented in VDirSurrogate, and VLeaf. Definition at line 276 of file VestaSourceCommon.C. Referenced by any_fattr(), VDirChangeable::freeTree(), RecursiveStats::visitFile(), and VSStat(). |
|
Reimplemented in VDirChangeable, VDirEvaluator, VDirSurrogate, VDirVolatileRoot, and VLeaf. Definition at line 459 of file VestaSourceCommon.C. Referenced by any_fattr(), apply_sattr(), main(), VDirChangeable::renameTo(), Replicate(), test_thread(), and VSStat(). |
|
Definition at line 550 of file VestaSourceCommon.C. Referenced by do_remove(), and myListCallback(). |
|
Definition at line 544 of file VestaSourceCommon.C. Referenced by AcquireMastership(), compareListCB(), main(), Replicate(), and test_thread(). |
|
Reimplemented in VDirChangeable, and VDirEvaluator. Definition at line 487 of file VestaSourceCommon.C. |
|
Definition at line 103 of file VDirSurrogateOnly.C. References LongId::noLock, and VDirSurrogate_init2(). Referenced by VDirVolatileRoot::createVolatileDirectory(), init(), VestaAttribsRep::markCallback(), VDirChangeable::markCallback(), VMemPool::readCheckpoint(), recoveryDone(), and VMemPool::writeCheckpoint(). |
|
Reimplemented in VDirSurrogate, and VLeaf. Definition at line 284 of file VestaSourceCommon.C. Referenced by VSWrite(). |
|
Reimplemented in VDirSurrogate. Definition at line 202 of file VDirSurrogateOnly.C. References VRErrorCode::inappropriateOp. Referenced by WriteAttribStep::execute(), main(), recoveryDone(), and test_thread(). |
|
|
Definition at line 105 of file VestaSource.C. Referenced by VDirChangeable::freeTree(), init(), and recoveryDone(). |
|
|
|
|
|
|