Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

Mastership.C File Reference

#include "UniqueId.H"
#include "FP.H"
#include "VestaSource.H"
#include "VDirSurrogate.H"
#include "logging.H"
#include "VRConcurrency.H"
#include "Mastership.H"
#include "VLogHelp.H"
#include "lock_timing.H"

Go to the source code of this file.

Defines

#define RECOVER_MASTERSHIP_SLEEP   3600

Functions

bool MastershipAccessCheck (VestaSource *vs, const char *direction, const char *hostport) throw ()
VestaSource::errorCode AcquireMastership (const char *pathname, const char *srcHost, const char *srcPort, char pathnameSep, AccessControl::Identity dwho, AccessControl::Identity swho) throw ()
void QueueRecoverMastership (const char *pathname, char pathnameSep, const char *requestid) throw ()
void DequeueRecoverMastershipL (RecoverMastershipInfo *rminfo)
void DequeueRecoverMastership (RecoverMastershipInfo *rminfo)
void MastershipCheckpoint (fstream &ckpt) throw ()
void MastershipInit1 () throw ()
void MastershipInit2 () throw ()

Variables

Text myHostPort
Text myMasterHint


Define Documentation

#define RECOVER_MASTERSHIP_SLEEP   3600
 

Definition at line 671 of file Mastership.C.


Function Documentation

VestaSource::errorCode AcquireMastership const char *  pathname,
const char *  srcHost,
const char *  srcPort,
char  pathnameSep,
AccessControl::Identity  dwho,
AccessControl::Identity  swho
throw ()
 

Definition at line 142 of file Mastership.C.

References VestaSource::ac, FP::ByteCnt, Text::cchars(), VestaSource::cedeMastership(), AccessControl::check(), VestaLog::commit(), DBG_MASTERSHIP, Repos::dprintf(), Text::Empty(), VestaSource::errorCodeString(), VestaAttribs::hasAttribs(), VRErrorCode::inappropriateOp, LongId::isAncestorOf(), LogPutQuotedString(), VestaSource::longid, VestaSource::lookupPathname(), VestaSource::master, MastershipAccessCheck(), MAX_ARC_LEN, VRErrorCode::noPermission, VRErrorCode::notFound, VRErrorCode::notMaster, VRErrorCode::ok, AccessControl::ownership, VestaLog::put(), QueueRecoverMastership(), ReadersWritersLock::releaseWrite(), VDirSurrogate::repositoryRoot(), VestaSource::repositoryRoot(), RootLongId, VRErrorCode::rpcFailure, RWLOCK_LOCKED_REASON, VestaLog::start(), VestaSource::type, VestaSource::typeTagString(), UniqueId(), VRLog, FP::Tag::Words(), and LongId::writeLock.

void DequeueRecoverMastership RecoverMastershipInfo rminfo  ) 
 

Definition at line 906 of file Mastership.C.

References DequeueRecoverMastershipL(), Basics::mutex::lock(), and Basics::mutex::unlock().

void DequeueRecoverMastershipL RecoverMastershipInfo rminfo  ) 
 

Definition at line 890 of file Mastership.C.

References RecoverMastershipInfo::next.

Referenced by DequeueRecoverMastership().

bool MastershipAccessCheck VestaSource vs,
const char *  direction,
const char *  hostport
throw ()
 

Definition at line 69 of file Mastership.C.

Referenced by AcquireMastership(), and VestaSource::cedeMastership().

void MastershipCheckpoint fstream &  ckpt  )  throw ()
 

Definition at line 1021 of file Mastership.C.

References Basics::mutex::lock(), RecoverMastershipInfo::next, RecoverMastershipInfo::pathname, RecoverMastershipInfo::pathnameSep, PutQuotedString(), RecoverMastershipInfo::requestid, and Basics::mutex::unlock().

Referenced by CheckpointServer().

void MastershipInit1  )  throw ()
 

Definition at line 1250 of file Mastership.C.

References DBG_ALWAYS, VDirSurrogate::defaultHost(), VDirSurrogate::defaultPort(), Repos::dprintf(), Text::Empty(), Text::FindChar(), VestaConfig::get(), TCP_sock::host_to_addr(), inet_ntoa_r(), Text::Length(), VestaConfig::failure::msg, and RegisterRecoveryCallback().

Referenced by main().

void MastershipInit2  )  throw ()
 

Definition at line 1365 of file Mastership.C.

References Basics::thread::fork().

Referenced by main().

void QueueRecoverMastership const char *  pathname,
char  pathnameSep,
const char *  requestid
throw ()
 

Definition at line 871 of file Mastership.C.

References Basics::mutex::lock(), NEW, RecoverMastershipInfo::next, RecoverMastershipInfo::pathname, RecoverMastershipInfo::pathnameSep, RecoverMastershipInfo::prev, RecoverMastershipInfo::requestid, Basics::cond::signal(), and Basics::mutex::unlock().

Referenced by AcquireMastership().


Variable Documentation

Text myHostPort
 

Definition at line 43 of file Mastership.C.

Text myMasterHint
 

Definition at line 43 of file Mastership.C.

Referenced by do_mkdir(), and InsertAppendableDirectoryStep::execute().


Generated on Mon May 8 00:49:04 2006 for Vesta by  doxygen 1.4.2