Loading...
Searching...
No Matches
XrdCmsCluster Class Reference

`#include <XrdCmsCluster.hh>`

Collaboration diagram for XrdCmsCluster:

## Public Types

enum | CmsLSOpts { LS_NULL =0 , LS_IPO =0x0100 , LS_IDNT =0x0200 , LS_ANY =0x0400 , LS_IFMASK = 0x0f }

## Public Member Functions

| XrdCmsCluster ()
virtual | ~XrdCmsCluster ()
XrdCmsNode * | Add (XrdLink *lp, int dport, int Status, int sport, const char *theNID, const char *theIF)
virtual void | BlackList (XrdOucTList *blP)
SMask_t | Broadcast (SMask_t smask, XrdCms::CmsRRHdr &Hdr, char *Data, int Dlen=0)
SMask_t | Broadcast (SMask_t smask, XrdCms::CmsRRHdr &Hdr, void *Data, int Dlen)
SMask_t | Broadcast (SMask_t, const struct iovec *, int, int tot=0)
int | Broadsend (SMask_t smask, XrdCms::CmsRRHdr &Hdr, void *Data, int Dlen)
SMask_t | getMask (const char *Cid)
SMask_t | getMask (const XrdNetAddr *addr)
XrdCmsSelected * | List (SMask_t mask, CmsLSOpts opts, bool &oksel)
int | Locate (XrdCmsSelect &Sel)
void * | MonPerf ()
void * | MonRefs ()
long long | Refs ()
void | Remove (const char *reason, XrdCmsNode *theNode, int immed=0)
void | Remove (XrdCmsNode *theNode)
void | ResetRef (SMask_t smask, bool isLocked=false)
int | Select (SMask_t pmask, int &port, char *hbuff, int &hlen, int isrw, int isMulti, int ifWant)
int | Select (XrdCmsSelect &Sel)
void | SLock (bool dolock, bool wrmode=true)
void | Space (XrdCms::SpaceData &sData, SMask_t smask)
int | Stats (char *bfr, int bln)
int | Statt (char *bfr, int bln)

## Public Attributes

int | NodeCnt

## Static Public Attributes

static const int | EReplete = -4
static const int | NotFound = -1
static const int | RetryErr = -3
static const int | Wait4CBk = -2

## Friends

class | XrdCmsDrop

## Detailed Description

Definition at line 114 of file XrdCmsCluster.hh.

## Member Enumeration Documentation

## CmsLSOpts

enum XrdCmsCluster::CmsLSOpts

Enumerator
LS_NULL |
LS_IPO |
LS_IDNT |
LS_ANY |
LS_IFMASK |

Definition at line 155 of file XrdCmsCluster.hh.

{LS_NULL=0, LS_IPO=0x0100, LS_IDNT=0x0200,
LS_ANY =0x0400, LS_IFMASK = 0x0f};
XrdCmsCluster::LS_IDNT
@ LS_IDNT
Definition XrdCmsCluster.hh:155
XrdCmsCluster::LS_ANY
@ LS_ANY
Definition XrdCmsCluster.hh:156
XrdCmsCluster::LS_IFMASK
@ LS_IFMASK
Definition XrdCmsCluster.hh:156
XrdCmsCluster::LS_NULL
@ LS_NULL
Definition XrdCmsCluster.hh:155
XrdCmsCluster::LS_IPO
@ LS_IPO
Definition XrdCmsCluster.hh:155

## Constructor & Destructor Documentation

## XrdCmsCluster()

XrdCmsCluster::XrdCmsCluster | ( |  | ) |

Definition at line 109 of file XrdCmsCluster.cc.

{
memset((void *)NodeTab, 0, sizeof(NodeTab));
memset((void *)AltMans, (int)' ', sizeof(AltMans));
AltMend = AltMans;
AltMent = -1;
NodeCnt = 0;
STHi = -1;
SelWtot = 0;
SelRtot = 0;
SelTcnt = 0;
peerHost = 0;
peerMask = ~peerHost;
}
XrdCmsCluster::NodeCnt
int NodeCnt
Definition XrdCmsCluster.hh:119

References NodeCnt.

## ~XrdCmsCluster()

virtual XrdCmsCluster::~XrdCmsCluster | ( |  | ) |

inline virtual

Definition at line 218 of file XrdCmsCluster.hh.

{} // This object should never be deleted

## Member Function Documentation

## Add()

XrdCmsNode * XrdCmsCluster::Add | ( | XrdLink * | lp,
|  | int | dport,
|  | int | Status,
|  | int | sport,
|  | const char * | theNID,
|  | const char * | theIF )

Definition at line 128 of file XrdCmsCluster.cc.

{
EPNAME("Add")
const char *act = "";
XrdCmsNode *nP = 0;
XrdCmsClustID *cidP = 0;
XrdSysRWLockHelper STMHelper(STMutex, false); // Need write lock!
int tmp, Slot, Free = -1, Bump1 = -1, Bump2 = -1, Bump3 = -1, aSet = 0;
bool Special = (Status & (CMS_isMan|CMS_isPeer));
bool SpecAlt = (Special && !(Status & CMS_isSuper));
bool Hidden = false;
// Find available slot for this node. Here are the priorities:
// Slot = Reconnecting node
// Free = Available slot ( 1st in table)
// Bump1 = Disconnected server (last in table)
// Bump2 = Connected server (last in table) if new one is managr/peer
// Bump3 = Disconnected managr/peer ( 1st in table) if new one is managr/peer
//
for (Slot = 0; Slot < STMax; Slot++)
if (NodeTab[Slot])
{if (NodeTab[Slot]->isNode(lp, theNID, port)) break;
/*Conn*/ if (NodeTab[Slot]->isConn)
{if (!NodeTab[Slot]->isPerm && Special)
Bump2 = Slot; // Last conn Server
/*Disc*/ } else {
if ( NodeTab[Slot]->isPerm)
{if (Bump3 < 0 && Special) Bump3 = Slot;}// 1st disc Man/Pr
else Bump1 = Slot; // Last disc Server
}
} else if (Free < 0) Free = Slot; // 1st free slot
// Check if node is already logged in or is a relogin
//
if (Slot < STMax)
{if (NodeTab[Slot] && NodeTab[Slot]->isBound)
{Say.Emsg("Cluster", lp->ID, "already logged in.");
return 0;
} else { // Rehook node to previous unconnected entry
nP = NodeTab[Slot];
nP->Link = lp;
nP->isOffline = 0;
nP->isBad &= ~XrdCmsNode::isSuspend;
nP->isConn = 1;
nP->Instance++;
nP->setName(lp, theIF, port); // Just in case it changed
act = "Reconnect ";
}
}
// First see if this node may be an alternate
//
if (!nP && SpecAlt)
{if ((cidP = XrdCmsClustID::Find(theNID)) && !(cidP->IsEmpty()))
{if (!(nP = AddAlt(cidP, lp, port, Status, sport, theNID, theIF)))
return 0;
aSet = 1; Slot = nP->NodeID;
if (nP != NodeTab[Slot]) {Hidden = true; act = "Alternate ";}
}
}
// Reuse an old ID if we must or redirect the incoming node
//
if (!nP)
{if (Free >= 0) Slot = Free;
else {if (Bump1 >= 0) Slot = Bump1;
else Slot = (Bump2 >= 0 ? Bump2 : Bump3);
if (Slot < 0)
{if (Status & CMS_isPeer) Say.Emsg("Cluster", "Add peer", lp->ID,
"failed; too many subscribers.");
else {sendAList(lp);
DEBUG(lp->ID <<" redirected; too many subscribers.");
}
return 0;
}
if (Status & CMS_isMan) {setAltMan(Slot, lp, sport); aSet=1;}
if (NodeTab[Slot] && !(Status & CMS_isPeer))
sendAList(NodeTab[Slot]->Link);
DEBUG(lp->ID << " bumps " << NodeTab[Slot]->Ident <<" #" <<Slot);
NodeTab[Slot]->Lock();
Remove("redirected", NodeTab[Slot], -1);
act = "Shoved ";
}
NodeTab[Slot] = nP = new XrdCmsNode(lp, theIF, theNID, port, 0, Slot);
if (!cidP) cidP = XrdCmsClustID::AddID(theNID);
if ((cidP->AddNode(nP, SpecAlt))) nP->cidP = cidP;
else {delete nP; NodeTab[Slot] = 0; return 0;} // OK to do delete!
}
// Indicate whether this snode can be redirected
//
nP->isPerm = (Status & (CMS_isMan | CMS_isPeer)) ? 1 : 0;
// Assign new server
//
if (!aSet && (Status & CMS_isSuper)) setAltMan(Slot, lp, sport);
if (Slot > STHi) STHi = Slot;
nP->isBound = 1;
nP->isConn = 1;
nP->isNoStage = 0 != (Status & CMS_noStage);
nP->isBad |= (Status & CMS_Suspend ? XrdCmsNode::isSuspend : 0);
nP->isMan = 0 != (Status & CMS_isMan);
nP->isPeer = 0 != (Status & CMS_isPeer);
nP->isBad |= XrdCmsNode::isDisabled;
nP->subsPort = sport;
// If this is an actual non-hidden node, count it
//
if (!Hidden)
{NodeCnt++;
if (Config.SUPLevel
&& (tmp = NodeCnt*Config.SUPLevel/100) > Config.SUPCount)
{Config.SUPCount=tmp; CmsState.Set(tmp);}
} else nP->isMan |= 0x02;
// Compute new peer mask, as needed
//
if (nP->isPeer) peerHost |= nP->NodeMask;
else peerHost &= ~nP->NodeMask;
peerMask = ~peerHost;
// Document login
//
if (QTRACE(Debug))
{DEBUG(act <<nP->Ident <<" to cluster " <<nP->myNID <<" slot "
<<Slot <<'.' <<nP->Instance <<" (nodecnt=" <<NodeCnt
<<" supn=" <<Config.SUPCount <<")");
}
// Compute new state of all nodes if we are a reporting manager.
//
if (Config.asManager() && !Hidden)
CmsState.Update(XrdCmsState::Counts,
nP->isBad & XrdCmsNode::isSuspend ? 0 : 1,
nP->isNoStage ? 0 : 1);
// All done. Return the node locked.
//
nP->Lock();
return nP;
}
DEBUG
#define DEBUG(x)
Definition XrdBwmTrace.hh:54
EPNAME
#define EPNAME(x)
Definition XrdBwmTrace.hh:56
QTRACE
#define QTRACE(act)
Definition XrdCmsTrace.hh:49
STMax
#define STMax
Definition XrdCmsTypes.hh:39
Debug
bool Debug
Definition XrdSecgsiProxy.cc:95
if
if(ec< 0) ec
XrdCmsClustID::AddID
static XrdCmsClustID * AddID(const char *cID)
Definition XrdCmsClustID.cc:57
XrdCmsClustID::IsEmpty
bool IsEmpty()
Definition XrdCmsClustID.hh:56
XrdCmsClustID::Find
static XrdCmsClustID * Find(const char *cID)
Definition XrdCmsClustID.cc:156
XrdCmsClustID::AddNode
bool AddNode(XrdCmsNode *nP, bool isMan)
Definition XrdCmsClustID.cc:97
XrdCmsCluster::Remove
void Remove(XrdCmsNode *theNode)
Definition XrdCmsCluster.cc:755
XrdCmsConfig::asManager
int asManager()
Definition XrdCmsConfig.hh:66
XrdCmsConfig::SUPLevel
int SUPLevel
Definition XrdCmsConfig.hh:83
XrdCmsConfig::SUPCount
int SUPCount
Definition XrdCmsConfig.hh:82
XrdCmsNode::isPerm
char isPerm
Definition XrdCmsNode.hh:73
XrdCmsNode::Ident
char * Ident
Definition XrdCmsNode.hh:61
XrdCmsNode::isConn
char isConn
Definition XrdCmsNode.hh:71
XrdCmsNode::isPeer
char isPeer
Definition XrdCmsNode.hh:68
XrdCmsNode::Lock
void Lock()
Definition XrdCmsNode.hh:175
XrdCmsNode::isDisabled
static const char isDisabled
Definition XrdCmsNode.hh:80
XrdCmsNode::isBad
char isBad
Definition XrdCmsNode.hh:63
XrdCmsNode::isOffline
char isOffline
Definition XrdCmsNode.hh:64
XrdCmsNode::isSuspend
static const char isSuspend
Definition XrdCmsNode.hh:81
XrdCmsNode::isNoStage
char isNoStage
Definition XrdCmsNode.hh:66
XrdCmsNode::isMan
char isMan
Definition XrdCmsNode.hh:67
XrdCmsNode::setName
void setName(XrdLink *lnkp, const char *theIF, int port)
Definition XrdCmsNode.cc:145
XrdCmsNode::isBound
char isBound
Definition XrdCmsNode.hh:69
XrdCmsState::Update
void Update(StateType StateT, int ActivVal, int StageVal=0)
Definition XrdCmsState.cc:258
XrdCmsState::Set
void Set(int ncount)
Definition XrdCmsState.cc:182
XrdCmsState::Counts
@ Counts
Definition XrdCmsState.hh:56
XrdLink::ID
char * ID
Pointer to the client's link identity.
Definition XrdLink.hh:210
XrdSysError::Emsg
int Emsg(const char *esfx, int ecode, const char *text1, const char *text2=0)
Definition XrdSysError.cc:95
XrdCms::CMS_isSuper
static const int CMS_isSuper
Definition XrdCmsCluster.hh:73
XrdCms::CMS_noStage
static const int CMS_noStage
Definition XrdCmsCluster.hh:65
XrdCms::Say
XrdSysError Say
Definition XrdCmsManager.cc:62
XrdCms::CmsState
XrdCmsState CmsState
Definition XrdCmsState.cc:55
XrdCms::CMS_isMan
static const int CMS_isMan
Definition XrdCmsCluster.hh:68
XrdCms::Config
XrdCmsConfig Config
Definition XrdCmsConfig.cc:108
XrdCms::CMS_isPeer
static const int CMS_isPeer
Definition XrdCmsCluster.hh:70
XrdCms::CMS_Suspend
static const int CMS_Suspend
Definition XrdCmsCluster.hh:66

References XrdCmsClustID::AddID(), XrdCmsClustID::AddNode(), XrdCms::CMS_isMan, XrdCms::CMS_isPeer, XrdCms::CMS_isSuper, XrdCms::CMS_noStage, XrdCms::CMS_Suspend, XrdCms::CmsState, XrdCms::Config, XrdCmsState::Counts, DEBUG, Debug, EPNAME, XrdCmsClustID::Find(), XrdLink::ID, XrdCmsNode::Ident, XrdCmsNode::isBad, XrdCmsNode::isBound, XrdCmsNode::isConn, XrdCmsNode::isDisabled, XrdCmsClustID::IsEmpty(), XrdCmsNode::isMan, XrdCmsNode::isNoStage, XrdCmsNode::isOffline, XrdCmsNode::isPeer, XrdCmsNode::isPerm, XrdCmsNode::isSuspend, XrdCmsNode::Lock(), NodeCnt, QTRACE, Remove(), XrdCms::Say, XrdCmsNode::setName(), and STMax.

Here is the call graph for this function:

## BlackList()

void XrdCmsCluster::BlackList | ( | XrdOucTList * | blP | ) |

virtual

Definition at line 330 of file XrdCmsCluster.cc.

{
static CmsDiscRequest discRequest = {{0, kYR_disc, 0, 0}};
XrdCmsNode *nP;
const char *etxt = "blacklisted.";
int i, blRD = 0;
bool inBL;
// Obtain a lock on the table. We need this in write mode!
//
STMutex.WriteLock();
// Run through the table looking to put or out of the blacklist
//
for (i = 0; i <= STHi; i++)
{if ((nP = NodeTab[i]))
{inBL = (blP && (blRD = XrdCmsBlackList::Present(nP->Name(), blP)));
if ((!inBL && !(nP->isBad & XrdCmsNode::isBlisted))
|| ( inBL && (nP->isBad & XrdCmsNode::isBlisted))) continue;
nP->g2nLock(STMutex); // Downgrade to only node lock
if (inBL)
{nP->isBad |= XrdCmsNode::isBlisted | XrdCmsNode::isDoomed;
if (blRD < -1)
{if (kYR_Version > nP->myVersion)
etxt = "blacklisted; redirect unsupported.";
else etxt = "blacklisted with redirect.";
nP->isBad |= XrdCmsNode::isDoomed;
nP->Send((char *)&discRequest, sizeof(discRequest));
}
Say.Emsg("Manager", nP->Name(), etxt);
} else {
nP->isBad &= ~(XrdCmsNode::isBlisted | XrdCmsNode::isDoomed);
Say.Emsg("Manager", nP->Name(), "removed from blacklist.");
}
nP->n2gLock(STMutex);
}
}
STMutex.UnLock();
}
XrdCmsBlackList::Present
static int Present(const char *hName, XrdOucTList *bList=0, char *rbuff=0, int rblen=0)
Definition XrdCmsBlackList.cc:515
XrdCmsNode::n2gLock
void n2gLock(XrdSysRWLock &gMutex, bool rdlock=false)
Definition XrdCmsNode.hh:168
XrdCmsNode::Send
int Send(const char *buff, int blen=0)
Definition XrdCmsNode.hh:184
XrdCmsNode::Name
char * Name()
Definition XrdCmsNode.hh:158
XrdCmsNode::g2nLock
void g2nLock(XrdSysRWLock &gMutex)
Definition XrdCmsNode.hh:162
XrdCmsNode::isDoomed
static const char isDoomed
Definition XrdCmsNode.hh:82
XrdCmsNode::isBlisted
static const char isBlisted
Definition XrdCmsNode.hh:79
XrdCms::kYR_Version
static const unsigned char kYR_Version
Definition YProtocol.hh:80
XrdCms::kYR_disc
@ kYR_disc
Definition YProtocol.hh:103

References XrdCmsNode::g2nLock(), XrdCmsNode::isBad, XrdCmsNode::isBlisted, XrdCmsNode::isDoomed, XrdCms::kYR_disc, XrdCms::kYR_Version, XrdCmsNode::n2gLock(), XrdCmsNode::Name(), XrdCmsBlackList::Present(), XrdCms::Say, XrdCmsNode::Send(), and XrdCmsNode::UnLock().

Here is the call graph for this function:

## Broadcast() [1/3]

SMask_t XrdCmsCluster::Broadcast | ( | SMask_t | smask,
|  | XrdCms::CmsRRHdr & | Hdr,
|  | char * | Data,
|  | int | Dlen = 0 )

Definition at line 411 of file XrdCmsCluster.cc.

{
struct iovec ioV[3], *iovP = &ioV[1];
unsigned short Temp;
int Blen;
// Construct packed data for the character argument. If data is a string then
// Dlen must include the null byte if it is specified at all.
//
Blen = XrdOucPup::Pack(&iovP, Data, Temp, (Dlen ? strlen(Data)+1 : Dlen));
Hdr.datalen = htons(static_cast<unsigned short>(Blen));
// Complete the iovec and send off the data
//
ioV[0].iov_base = (char *)&Hdr; ioV[0].iov_len = sizeof(Hdr);
return Broadcast(smask, ioV, 3, Blen+sizeof(Hdr));
}
XrdCmsCluster::Broadcast
SMask_t Broadcast(SMask_t, const struct iovec *, int, int tot=0)
Definition XrdCmsCluster.cc:374
XrdOucPup::Pack
static int Pack(struct iovec **, const char *, unsigned short &buff)
Definition XrdOucPup.cc:52
XrdCms::CmsRRHdr::datalen
kXR_unt16 datalen
Definition YProtocol.hh:86

References Broadcast(), XrdCms::CmsRRHdr::datalen, and XrdOucPup::Pack().

Here is the call graph for this function:

## Broadcast() [2/3]

SMask_t XrdCmsCluster::Broadcast | ( | SMask_t | smask,
|  | XrdCms::CmsRRHdr & | Hdr,
|  | void * | Data,
|  | int | Dlen )

Definition at line 432 of file XrdCmsCluster.cc.

{
struct iovec ioV[2] = {{(char *)&Hdr, sizeof(Hdr)},
{(char *)Data, (size_t)Dlen}};
// Send of the data as eveything was constructed properly
//
Hdr.datalen = htons(static_cast<unsigned short>(Dlen));
return Broadcast(smask, ioV, 2, Dlen+sizeof(Hdr));
}

References Broadcast(), and XrdCms::CmsRRHdr::datalen.

Here is the call graph for this function:

## Broadcast() [3/3]

SMask_t XrdCmsCluster::Broadcast | ( | SMask_t | smask,
|  | const struct iovec * | iod,
|  | int | iovcnt,
|  | int | tot = 0 )

Definition at line 374 of file XrdCmsCluster.cc.

{
EPNAME("Broadcast")
int i;
XrdCmsNode *nP;
SMask_t bmask, unQueried(0);
// Obtain a lock on the table and screen out peer nodes
//
STMutex.ReadLock(); // Sufficient to prevent modifications
bmask = smask & peerMask;
// Run through the table looking for nodes to send messages to. We don't need
// the node lock for this but we do need to up the reference count to keep the
// node pointer valid for the duration of the send() (may or may not block).
//
for (i = 0; i <= STHi; i++)
{if ((nP = NodeTab[i]) && nP->isNode(bmask))
{if (nP->isOffline) unQueried |= nP->Mask();
else {nP->Ref();
STMutex.UnLock();
if (nP->Send(iod, iovcnt, iotot) < 0)
{unQueried |= nP->Mask();
DEBUG(nP->Ident <<" is unreachable");
}
nP->unRef();
STMutex.ReadLock();
}
}
}
STMutex.UnLock();
return unQueried;
}
SMask_t
unsigned long long SMask_t
Definition XrdCmsTypes.hh:33
XrdCmsNode::isNode
int isNode(SMask_t smask)
Definition XrdCmsNode.hh:145

References DEBUG, EPNAME, XrdCmsNode::Ident, XrdCmsNode::isNode(), XrdCmsNode::isOffline, XrdCmsNode::Mask(), XrdCmsNode::Ref(), XrdCmsNode::Send(), and XrdCmsNode::unRef().

Referenced by Broadcast(), Broadcast(), and MonPerf().

Here is the call graph for this function:
Here is the caller graph for this function:

## Broadsend()

int XrdCmsCluster::Broadsend | ( | SMask_t | smask,
|  | XrdCms::CmsRRHdr & | Hdr,
|  | void * | Data,
|  | int | Dlen )

Definition at line 450 of file XrdCmsCluster.cc.

{
EPNAME("Broadsend");
static int Start = 0;
XrdCmsNode *nP;
struct iovec ioV[2] = {{(char *)&Hdr, sizeof(Hdr)},
{(char *)Data, (size_t)Dlen}};
int i, Beg, Fin, ioTot = Dlen+sizeof(Hdr);
// Send of the data as eveything was constructed properly
//
Hdr.datalen = htons(static_cast<unsigned short>(Dlen));
// Obtain a lock on the table and get the starting and ending position. Note
// that the mechnism we use will necessarily skip newly added nodes.
//
STMutex.ReadLock(); // Sufficient to prevent modifications
Beg = Start = (Start <= STHi ? Start+1 : 0);
Fin = STHi;
// Run through the table looking for a node to send a message to. We don't need
// the node lock for this but we do need to up the reference count to keep the
// node pointer valid for the duration of the send() (may or may not block).
//
do{for (i = Beg; i <= Fin; i++)
{if ((nP = NodeTab[i]) && nP->isNode(Who))
{if (nP->isOffline) continue;
nP->Ref();
STMutex.UnLock();
if (nP->Send(ioV, 2, ioTot) >= 0) {nP->unRef(); return 1;}
DEBUG(nP->Ident <<" is unreachable");
nP->unRef();
STMutex.ReadLock();
}
}
if (!Beg) break;
Fin = Beg-1; Beg = 0;
} while(1);
// Did not send to anyone
//
STMutex.UnLock();
return 0;
}
XrdCmsNode::Ref
void Ref()
Definition XrdCmsNode.hh:179
XrdCmsNode::unRef
void unRef()
Definition XrdCmsNode.hh:180

References XrdCms::CmsRRHdr::datalen, DEBUG, EPNAME, XrdCmsNode::Ident, XrdCmsNode::isNode(), XrdCmsNode::isOffline, XrdCmsNode::Ref(), XrdCmsNode::Send(), and XrdCmsNode::unRef().

Here is the call graph for this function:

## getMask() [1/2]

SMask_t XrdCmsCluster::getMask | ( | const char * | Cid | ) |

Definition at line 524 of file XrdCmsCluster.cc.

{
return XrdCmsClustID::Mask(Cid);
}
XrdCmsClustID::Mask
static SMask_t Mask(const char *cID)
Definition XrdCmsClustID.cc:186

References XrdCmsClustID::Mask().

Here is the call graph for this function:

## getMask() [2/2]

SMask_t XrdCmsCluster::getMask | ( | const XrdNetAddr * | addr | ) |

Definition at line 500 of file XrdCmsCluster.cc.

{
int i;
XrdCmsNode *nP;
SMask_t smask(0);
// Obtain a lock on the table
//
STMutex.ReadLock();
// Run through the table looking for a node with matching IP address
//
for (i = 0; i <= STHi; i++)
if ((nP = NodeTab[i]) && nP->isNode(addr))
{smask = nP->NodeMask; break;}
// All done
//
STMutex.UnLock();
return smask;
}

References XrdCmsNode::isNode().

Here is the call graph for this function:

## List()

XrdCmsSelected * XrdCmsCluster::List | ( | SMask_t | mask,
|  | CmsLSOpts | opts,
|  | bool & | oksel )

Definition at line 533 of file XrdCmsCluster.cc.

{
static const int iSize = XrdCmsSelected::IdentSize;
XrdCmsNode *nP;
XrdCmsSelected *sipp = 0, *sip;
XrdNetIF::ifType ifType = (XrdNetIF::ifType)(opts & LS_IFMASK);
XrdNetIF::ifType ifGet = ifType;
int i, destLen;
bool retName = (opts & LS_IDNT) != 0;
bool retAny = (opts & LS_ANY ) != 0;
bool retDest = retName || (opts & LS_IPO);
// If only one wanted, the select appropriately
//
oksel = false;
STMutex.ReadLock();
for (i = 0; i <= STHi; i++)
if ((nP=NodeTab[i]) && (nP->NodeMask & mask))
{oksel = true;
if (retDest)
{ if (nP->netIF.HasDest(ifType)) ifGet = ifType;
else if (!retAny) continue;
else {ifGet = (XrdNetIF::ifType)(ifType ^ XrdNetIF::PrivateIF);
if (!nP->netIF.HasDest(ifGet)) continue;
}
}
sip = new XrdCmsSelected(sipp);
if (retDest) destLen = nP->netIF.GetDest(sip->Ident, iSize,
ifGet, retName);
else if (nP->myNlen >= XrdCmsSelected::IdentSize) destLen = 0;
else {strcpy(sip->Ident, nP->myName); destLen = nP->myNlen;}
if (!destLen) {delete sip; continue;}
sip->IdentLen = destLen;
sip->Mask = nP->NodeMask;
sip->Id = nP->NodeID;
sip->Port = nP->netIF.Port();
sip->RefTotW = nP->RefTotW;
sip->RefTotR = nP->RefTotR;
sip->Shrin = nP->Shrin;
sip->Share = nP->Share;
sip->RoleID = nP->RoleID;
sip->Status = (nP->isOffline ? XrdCmsSelected::Offline : 0);
if (nP->isBad & (XrdCmsNode::isDisabled | XrdCmsNode::isBlisted))
sip->Status |= XrdCmsSelected::Disable;
if (nP->isNoStage) sip->Status |= XrdCmsSelected::NoStage;
if (nP->isBad & XrdCmsNode::isSuspend)
sip->Status |= XrdCmsSelected::Suspend;
if (nP->isRW ) sip->Status |= XrdCmsSelected::isRW;
if (nP->isMan ) sip->Status |= XrdCmsSelected::isMangr;
sipp = sip;
}
STMutex.UnLock();
// Return result
//
return sipp;
}
opts
struct myOpts opts
XrdCmsNode::RoleID
char RoleID
Definition XrdCmsNode.hh:75
XrdCmsNode::isRW
char isRW
Definition XrdCmsNode.hh:65
XrdCmsSelected::IdentSize
static const int IdentSize
Definition XrdCmsSelect.hh:108
XrdCmsSelected::Disable
@ Disable
Definition XrdCmsSelect.hh:124
XrdCmsSelected::Suspend
@ Suspend
Definition XrdCmsSelect.hh:127
XrdCmsSelected::NoStage
@ NoStage
Definition XrdCmsSelect.hh:125
XrdCmsSelected::Offline
@ Offline
Definition XrdCmsSelect.hh:126
XrdCmsSelected::isMangr
@ isMangr
Definition XrdCmsSelect.hh:129
XrdCmsSelected::isRW
@ isRW
Definition XrdCmsSelect.hh:128
XrdNetIF::Port
int Port()
Definition XrdNetIF.hh:276
XrdNetIF::HasDest
bool HasDest(ifType ifT=PublicV6)
Definition XrdNetIF.hh:221
XrdNetIF::GetDest
int GetDest(char *dest, int dlen, ifType ifT=PublicV6, bool prefn=false)
Definition XrdNetIF.cc:389
XrdNetIF::ifType
ifType
The enum that is used to index into ifData to get appropriate interface.
Definition XrdNetIF.hh:64
XrdNetIF::PrivateIF
@ PrivateIF
Definition XrdNetIF.hh:68

References XrdCmsSelected::Disable, XrdNetIF::GetDest(), XrdNetIF::HasDest(), XrdCmsSelected::IdentSize, XrdCmsNode::isBad, XrdCmsNode::isBlisted, XrdCmsNode::isDisabled, XrdCmsNode::isMan, XrdCmsSelected::isMangr, XrdCmsNode::isNoStage, XrdCmsNode::isOffline, XrdCmsNode::isRW, XrdCmsSelected::isRW, XrdCmsNode::isSuspend, LS_ANY, LS_IDNT, LS_IFMASK, LS_IPO, XrdCmsSelected::NoStage, XrdCmsSelected::Offline, opts, XrdNetIF::Port(), XrdNetIF::PrivateIF, XrdCmsNode::RoleID, and XrdCmsSelected::Suspend.

Referenced by Statt().

Here is the call graph for this function:
Here is the caller graph for this function:

## Locate()

int XrdCmsCluster::Locate | ( | XrdCmsSelect & | Sel | ) |

Definition at line 596 of file XrdCmsCluster.cc.

{
EPNAME("Locate");
XrdCmsPInfo pinfo;
SMask_t qfVec(0);
char *Path;
int retc = 0;
// Check if this is a locate for all current servers
//
if (*Sel.Path.Val != '*') Path = Sel.Path.Val;
else {if (*(Sel.Path.Val+1) == '\0')
{Sel.Vec.hf = ~0LL; Sel.Vec.pf = Sel.Vec.wf = 0;
return 0;
}
Path = Sel.Path.Val+1;
}
// Find out who serves this path
//
if (!Cache.Paths.Find(Path, pinfo) || !pinfo.rovec)
{Sel.Vec.hf = Sel.Vec.pf = Sel.Vec.wf = 0;
return NotFound;
} else Sel.Vec.wf = pinfo.rwvec;
// Check if this was a non-lookup request
//
if (*Sel.Path.Val == '*')
{Sel.Vec.hf = pinfo.rovec; Sel.Vec.pf = 0;
Sel.Vec.wf = pinfo.rwvec;
return 0;
}
// Complete the request info object if we have one
//
if (Sel.InfoP)
{Sel.InfoP->rwVec = pinfo.rwvec;
Sel.InfoP->isLU = 1;
}
// If we are running a shared file system preform an optional restricted
// pre-selection and then do a standard selection.
//
if (baseFS.isDFS())
{SMask_t amask, smask, pmask;
amask = pmask = pinfo.rovec;
smask = (Sel.Opts & XrdCmsSelect::Online ? 0 : pinfo.ssvec & amask);
Sel.Resp.DLen = 0;
if (!(retc = SelDFS(Sel, amask, pmask, smask, 1)))
return (Sel.Opts & XrdCmsSelect::Asap && Sel.InfoP
? Cache.WT4File(Sel,Sel.Vec.hf) : Config.LUPDelay);
if (retc < 0) return NotFound;
return 0;
}
// First check if we have seen this file before. If so, get nodes that have it.
// A Refresh request kills this because it's as if we hadn't seen it before.
// If the file was found but either a query is in progress or we have a server
// bounce; the client must wait.
//
if (Sel.Opts & XrdCmsSelect::Refresh
|| !(retc = Cache.GetFile(Sel, pinfo.rovec)))
{Cache.AddFile(Sel, 0);
qfVec = pinfo.rovec; Sel.Vec.hf = 0;
} else qfVec = Sel.Vec.bf;
// Compute the delay, if any
//
if ((!qfVec && retc >= 0) || (Sel.Vec.hf && Sel.InfoP)) retc = 0;
else if (!(retc = Cache.WT4File(Sel, Sel.Vec.hf))) retc = Wait4CBk;
// Check if we have to ask any nodes if they have the file
//
if (qfVec)
{CmsStateRequest QReq = {{Sel.Path.Hash, kYR_state, kYR_raw, 0}};
if (Sel.Opts & XrdCmsSelect::Refresh)
QReq.Hdr.modifier |= CmsStateRequest::kYR_refresh;
TRACE(Files, "seeking " <<Sel.Path.Val);
qfVec = Cluster.Broadcast(qfVec, QReq.Hdr,
(void *)Sel.Path.Val, Sel.Path.Len+1);
if (qfVec) Cache.UnkFile(Sel, qfVec);
}
return retc;
}
Path
XrdOucString Path
Definition XrdSecpwdSrvAdmin.cc:160
TRACE
#define TRACE(act, x)
Definition XrdTrace.hh:63
XrdCmsBaseFS::isDFS
int isDFS()
Definition XrdCmsBaseFS.hh:119
XrdCmsCache::GetFile
int GetFile(XrdCmsSelect &Sel, SMask_t mask)
Definition XrdCmsCache.cc:232
XrdCmsCache::AddFile
int AddFile(XrdCmsSelect &Sel, SMask_t mask)
Definition XrdCmsCache.cc:117
XrdCmsCache::Paths
XrdCmsPList_Anchor Paths
Definition XrdCmsCache.hh:49
XrdCmsCache::UnkFile
int UnkFile(XrdCmsSelect &Sel, SMask_t mask)
Definition XrdCmsCache.cc:278
XrdCmsCache::WT4File
int WT4File(XrdCmsSelect &Sel, SMask_t mask)
Definition XrdCmsCache.cc:306
XrdCmsCluster::NotFound
static const int NotFound
Definition XrdCmsCluster.hh:188
XrdCmsCluster::Wait4CBk
static const int Wait4CBk
Definition XrdCmsCluster.hh:189
XrdCmsConfig::LUPDelay
int LUPDelay
Definition XrdCmsConfig.hh:73
XrdCmsKey::Hash
unsigned int Hash
Definition XrdCmsKey.hh:53
XrdCmsKey::Val
char * Val
Definition XrdCmsKey.hh:52
XrdCmsKey::Len
short Len
Definition XrdCmsKey.hh:54
XrdCmsPInfo::ssvec
SMask_t ssvec
Definition XrdCmsPList.hh:49
XrdCmsPInfo::rovec
SMask_t rovec
Definition XrdCmsPList.hh:47
XrdCmsPInfo::rwvec
SMask_t rwvec
Definition XrdCmsPList.hh:48
XrdCmsPList_Anchor::Find
int Find(const char *pname, XrdCmsPInfo &masks)
Definition XrdCmsPList.cc:77
XrdCmsRRQInfo::rwVec
SMask_t rwVec
Definition XrdCmsRRQ.hh:59
XrdCmsRRQInfo::isLU
char isLU
Definition XrdCmsRRQ.hh:54
XrdCmsSelect::Refresh
@ Refresh
Definition XrdCmsSelect.hh:63
XrdCmsSelect::Online
@ Online
Definition XrdCmsSelect.hh:58
XrdCmsSelect::Asap
@ Asap
Definition XrdCmsSelect.hh:64
XrdCmsSelect::Opts
int Opts
Definition XrdCmsSelect.hh:52
XrdCmsSelect::Resp
struct XrdCmsSelect::@372246154012353073336061155127145056202367365025 Resp
XrdCmsSelect::InfoP
XrdCmsRRQInfo * InfoP
Definition XrdCmsSelect.hh:47
XrdCmsSelect::Path
XrdCmsKey Path
Definition XrdCmsSelect.hh:46
XrdCmsSelect::Vec
struct XrdCmsSelect::@234326324321301042052133314024110005315140201317 Vec
XrdCms::Cache
XrdCmsCache Cache
Definition XrdPfcFile.hh:204
XrdCms::CmsRRHdr::modifier
kXR_char modifier
Definition YProtocol.hh:85
XrdCms::Cluster
XrdCmsCluster Cluster
Definition XrdCmsCluster.cc:72
XrdCms::baseFS
XrdCmsBaseFS baseFS
XrdCms::kYR_raw
@ kYR_raw
Definition YProtocol.hh:132
XrdCms::kYR_state
@ kYR_state
Definition YProtocol.hh:110
XrdCms::CmsStateRequest::kYR_refresh
@ kYR_refresh
Definition YProtocol.hh:552
XrdCms::CmsStateRequest::Hdr
CmsRRHdr Hdr
Definition YProtocol.hh:549

References XrdCmsSelect::Asap, XrdCms::baseFS, XrdCms::Cache, XrdCms::Cluster, XrdCms::Config, EPNAME, XrdCmsKey::Hash, XrdCms::CmsStateRequest::Hdr, XrdCmsSelect::InfoP, XrdCmsRRQInfo::isLU, XrdCms::kYR_raw, XrdCms::CmsStateRequest::kYR_refresh, XrdCms::kYR_state, XrdCmsKey::Len, XrdCms::CmsRRHdr::modifier, NotFound, XrdCmsSelect::Online, XrdCmsSelect::Opts, Path, XrdCmsSelect::Path, XrdCmsSelect::Refresh, XrdCmsSelect::Resp, XrdCmsPInfo::rovec, XrdCmsRRQInfo::rwVec, XrdCmsPInfo::rwvec, XrdCmsPInfo::ssvec, TRACE, XrdCmsKey::Val, XrdCmsSelect::Vec, and Wait4CBk.

## MonPerf()

void * XrdCmsCluster::MonPerf | ( |  | ) |

Definition at line 685 of file XrdCmsCluster.cc.

{
CmsUsageRequest Usage = {{0, kYR_usage, 0, 0}};
struct iovec ioV[] = {{(char *)&Usage, sizeof(Usage)}};
int ioVnum = sizeof(ioV)/sizeof(struct iovec);
int ioVtot = sizeof(Usage);
SMask_t allNodes(~0);
int uInterval = Config.AskPing*Config.AskPerf;
// Sleep for the indicated amount of time, then ask for load on each server
//
while(uInterval)
{XrdSysTimer::Snooze(uInterval);
Broadcast(allNodes, ioV, ioVnum, ioVtot);
}
return (void *)0;
}
Usage
void Usage(const char *msg)
Definition XrdAccTest.cc:105
XrdCmsConfig::AskPing
int AskPing
Definition XrdCmsConfig.hh:93
XrdCmsConfig::AskPerf
int AskPerf
Definition XrdCmsConfig.hh:92
XrdSysTimer::Snooze
static void Snooze(int seconds)
Definition XrdSysTimer.cc:168
XrdCms::kYR_usage
@ kYR_usage
Definition YProtocol.hh:116

References Broadcast(), XrdCms::Config, XrdCms::kYR_usage, XrdSysTimer::Snooze(), and Usage().

Here is the call graph for this function:

## MonRefs()

void * XrdCmsCluster::MonRefs | ( |  | ) |

Definition at line 707 of file XrdCmsCluster.cc.

{
XrdCmsNode *nP;
int snooze_interval = 60, snooze_total = 0;
int rCnt = 0, wCnt = 0;
bool resetW, resetR, resetRW;
// Sleep for the snooze interval. If a reset was requested then do a selective
// reset unless we reached our snooze maximum and enough selections have gone
// by; in which case, do a global reset.
//
do {XrdSysTimer::Snooze(snooze_interval);
int totR = 0, totW = 0;
STMutex.ReadLock();
for (int i = 0; i <= STHi; i++)
{if ((nP = NodeTab[i]))
{totR += nP->RefTotR;
totW += nP->RefTotW;
}
}
STMutex.UnLock();
rCnt += (totR - SelRtot); SelRtot = totR;
wCnt += (totW - SelWtot); SelWtot = totW;
snooze_total += snooze_interval;
resetR = (rCnt >= Config.RefTurn);
resetW = (wCnt >= Config.RefTurn);
resetRW = (snooze_total >= Config.RefReset && (resetW || resetR));
if (resetRW)
{ResetRef((SMask_t)0);
if (resetR) rCnt = 0;
if (resetW) wCnt = 0;
snooze_total = 0;
}
} while(1);
return (void *)0;
}
XrdCmsCluster::ResetRef
void ResetRef(SMask_t smask, bool isLocked=false)
Definition XrdCmsCluster.cc:902
XrdCmsConfig::RefTurn
int RefTurn
Definition XrdCmsConfig.hh:91
XrdCmsConfig::RefReset
int RefReset
Definition XrdCmsConfig.hh:90

References XrdCms::Config, ResetRef(), and XrdSysTimer::Snooze().

Here is the call graph for this function:

## Refs()

long long XrdCmsCluster::Refs | ( |  | ) |

inline

Definition at line 174 of file XrdCmsCluster.hh.

{return SelWtot+SelRtot;}

## Remove() [1/2]

void XrdCmsCluster::Remove | ( | const char * | reason,
|  | XrdCmsNode * | theNode,
|  | int | immed = 0 )

Definition at line 766 of file XrdCmsCluster.cc.

{
EPNAME("Remove_Node")
struct theLocks
{XrdSysRWLock *myMutex;
XrdCmsNode *myNode;
int myNID;
int myInst;
bool hasLK;
bool doDrop;
char myIdent[510];
theLocks(XrdSysRWLock *mtx, XrdCmsNode *node, int immed)
: myMutex(mtx), myNode(node), hasLK(immed < 0),
doDrop(false)
{strlcpy(myIdent, node->Ident, sizeof(myIdent));
myNID = node->ID(myInst);
if (!hasLK)
{myNode->Ref(); // Keep alive
myNode->UnLock();
myMutex->WriteLock(); // Get global lock
myNode->Lock();
myNode->unRef(); // Can't escape now
}
}
~theLocks()
{if (myNode)
{if (doDrop)
{myNode->isBound = 0;
myNode->DropTime = 0;
myNode->DropJob = new XrdCmsDrop(myNode);
myNode->UnLock();
} else myNode->UnLock();
}
if (!hasLK) myMutex->UnLock();
}
} LockHandler(&STMutex, theNode, immed);
XrdCmsNode *altNode = 0;
int Inst, NodeID = theNode->ID(Inst);
// The LockHandler makes sure that the proper locks are obtained in a deadlock
// free order. However, this may require that the node lock be released and
// then re-aquired. We check if we are still dealing with same node at entry.
// If not, issue message and high-tail it out.
//
if (LockHandler.myNID != NodeID || LockHandler.myInst != Inst)
{Say.Emsg("Manager", LockHandler.myIdent, "removal aborted.");
DEBUG(LockHandler.myIdent <<" node " <<NodeID <<'.' <<Inst <<" != "
<< LockHandler.myNID <<'.' <<LockHandler.myInst <<" at entry.");
}
// Mark node as being offline and remove any drop job from it
//
theNode->isOffline = 1; // Global lock is held here
// If the node is connected we simply close the connection. This will cause
// the connection handler to re-initiate the node removal. This condition
// exists only if one node is being displaced by another node. The Disc()
// may take a long time, but it's done async by default on the WAN and sync
// on the LAN (local connections are fast enough and error-free for this).
//
if (theNode->isConn)
{theNode->Disc(reason, 0);
theNode->isGone = 1; // Disc() sets the isOffline flag
return;
}
// If we are not the primary node, then get rid of this node post-haste
//
if (!(NodeTab[NodeID] == theNode))
{const char *why = (theNode->isMan ? "dropped as alternate."
: "dropped and redirected.");
Say.Emsg("Remove_Node", theNode->Ident, why);
LockHandler.doDrop = true;
return;
}
// If the node is part of the cluster, do not count it anymore and
// indicate new state of this nodes if we are a reporting manager
//
if (theNode->isBound)
{theNode->isBound = 0;
NodeCnt--;
if (Config.asManager())
CmsState.Update(XrdCmsState::Counts,
theNode->isBad & XrdCmsNode::isSuspend ? 0 : -1,
theNode->isNoStage ? 0 : -1);
}
// If we have a working alternate, substitute it here and immediately drop
// the former primary. This allows the cache to remain warm.
//
if (theNode->isMan && theNode->cidP && !(theNode->cidP->IsSingle())
&& (altNode = theNode->cidP->RemNode(theNode)))
{if (altNode->isBound) NodeCnt++;
NodeTab[NodeID] = altNode;
if (Config.asManager())
CmsState.Update(XrdCmsState::Counts,
altNode->isBad & XrdCmsNode::isSuspend ? 0 : 1,
altNode->isNoStage ? 0 : 1);
setAltMan(altNode->NodeID, altNode->Link, altNode->subsPort);
Say.Emsg("Manager",altNode->Ident,"replacing dropped",theNode->Ident);
LockHandler.doDrop = true;
return;
}
// If this is an immediate drop request, do so now. Drop() will delete
// the node object, so remove the node lock and tell LockHandler that.
//
if (immed || !Config.DRPDelay || theNode->isBad & XrdCmsNode::isDoomed)
{theNode->UnLock();
LockHandler.myNode = 0;
Drop(NodeID, Inst);
return;
}
// If a drop job is already scheduled, update the instance field. Otherwise,
// Schedule a node drop at a future time.
//
theNode->DropTime = time(0)+Config.DRPDelay;
if (theNode->DropJob) theNode->DropJob->nodeInst = Inst;
else theNode->DropJob = new XrdCmsDrop(NodeID, Inst);
// Document removal
//
if (reason)
Say.Emsg("Manager", theNode->Ident, "scheduled for removal;", reason);
else DEBUG(theNode->Ident <<" node " <<NodeID <<'.' <<Inst);
}
strlcpy
size_t strlcpy(char *dst, const char *src, size_t sz)
Definition XrdSysPlatform.cc:60
XrdCmsClustID::RemNode
XrdCmsNode * RemNode(XrdCmsNode *nP)
Definition XrdCmsClustID.cc:218
XrdCmsClustID::IsSingle
bool IsSingle()
Definition XrdCmsClustID.hh:58
XrdCmsCluster::XrdCmsDrop
friend class XrdCmsDrop
Definition XrdCmsCluster.hh:117
XrdCmsConfig::DRPDelay
int DRPDelay
Definition XrdCmsConfig.hh:76
XrdCmsDrop::nodeInst
int nodeInst
Definition XrdCmsCluster.cc:102
XrdCmsNode::isGone
char isGone
Definition XrdCmsNode.hh:72
XrdCmsNode::ID
int ID(int &INum)
Definition XrdCmsNode.hh:139
XrdCmsNode::Disc
void Disc(const char *reason=0, int needLock=1)
Definition XrdCmsNode.cc:254
XrdCmsNode::UnLock
void UnLock()
Definition XrdCmsNode.hh:177
XrdSysRWLock::WriteLock
void WriteLock()
Definition XrdSysPthread.hh:343
XrdSysRWLock::UnLock
void UnLock()
Definition XrdSysPthread.hh:348

References XrdCms::CmsState, XrdCms::Config, XrdCmsState::Counts, DEBUG, XrdCmsNode::Disc(), EPNAME, XrdCmsNode::ID(), XrdCmsNode::Ident, XrdCmsNode::isBad, XrdCmsNode::isBound, XrdCmsNode::isConn, XrdCmsNode::isDoomed, XrdCmsNode::isGone, XrdCmsNode::isMan, XrdCmsNode::isNoStage, XrdCmsNode::isOffline, XrdCmsClustID::IsSingle(), XrdCmsNode::isSuspend, XrdCmsNode::Lock(), NodeCnt, XrdCmsDrop::nodeInst, XrdCmsNode::Ref(), XrdCmsClustID::RemNode(), XrdCms::Say, strlcpy(), XrdCmsNode::UnLock(), XrdSysRWLock::UnLock(), XrdCmsNode::unRef(), XrdSysRWLock::WriteLock(), and XrdCmsDrop.

Here is the call graph for this function:

## Remove() [2/2]

void XrdCmsCluster::Remove | ( | XrdCmsNode * | theNode | ) |

Definition at line 755 of file XrdCmsCluster.cc.

{
theNode->DropJob = new XrdCmsDrop(theNode);
}

References XrdCmsDrop.

Referenced by Add().

Here is the call graph for this function:
Here is the caller graph for this function:

## ResetRef()

void XrdCmsCluster::ResetRef | ( | SMask_t | smask,
|  | bool | isLocked = false )

Definition at line 902 of file XrdCmsCluster.cc.

{
XrdCmsNode *nP;
bool doAll (nMask == 0);
// Obtain a lock on the table if not already locked
//
if (!isLocked) STMutex.ReadLock();
// Reset reference counts as needed. We can do this with a read lock as the
// reference counters are atomic.
//
for (int i = 0; i <= STHi; i++)
{if ((nP = NodeTab[i]) && (doAll || nP->isNode(nMask)))
{nP->RefW = 0;
nP->RefR = 0;
nP->Shrem = nP->Share;
}
}
// Unlock table and exit
//
if (!isLocked) STMutex.UnLock();
}

References XrdCmsNode::isNode().

Referenced by MonRefs().

Here is the call graph for this function:
Here is the caller graph for this function:

## Select() [1/2]

int XrdCmsCluster::Select | ( | SMask_t | pmask,
|  | int & | port,
|  | char * | hbuff,
|  | int & | hlen,
|  | int | isrw,
|  | int | isMulti,
|  | int | ifWant )

Definition at line 1087 of file XrdCmsCluster.cc.

{
static const SMask_t smLow(255);
XrdCmsSelector selR;
XrdCmsNode *nP = 0;
SMask_t tmask;
int Snum = 0;
XrdNetIF::ifType nType = static_cast<XrdNetIF::ifType>(ifWant);
// If there is nothing to select from, return failure
//
if (!pmask) return 0;
// Obtain the network we need for the client
//
selR.needNet = XrdNetIF::Mask(nType);
// Initialize
//
selR.needSpace = 0;
// Packed selection can never occur in this code path so we turn it off
//
selR.selPack = 0;
// If we are exporting a shared-everything system then the incoming mask
// may have more than one server indicated. So, we need to do a full select.
// This is forced when isMulti is true, indicating a choice may exist. Note
// that the node, if any, is returned unlocked but we have the global mutex.
//
if (isMulti || baseFS.isDFS())
{STMutex.ReadLock();
nP = (Config.sched_RR ? SelbyRef(pmask,selR)
: Config.sched_LoadR == 0 ? SelbyLoad(pmask,selR)
: SelbyLoadR(pmask, selR));
if (nP) hlen = nP->netIF.GetName(hbuff, port, nType) + 1;
else hlen = 0;
STMutex.UnLock();
return hlen != 1;
}
// In shared-nothing systems the incoming mask will only have a single node.
// Compute the a single node number that is contained in the mask.
//
do {if (!(tmask = pmask & smLow)) Snum += 8;
else {while((tmask = tmask>>1)) Snum++; break;}
} while((pmask = pmask >> 8));
// See if the node passes muster
//
STMutex.ReadLock();
if ((nP = NodeTab[Snum]))
{ if (nP->isBad) nP = 0;
else if (!Config.sched_RR && (nP->myLoad > Config.MaxLoad)) nP = 0;
else if (!(selR.needNet & nP->hasNet)) nP = 0;
if (nP)
{if (isrw)
if (nP->isNoStage || nP->DiskFree < nP->DiskMinF) nP = 0;
else {nP->RefTotW++; nP->RefW++;}
else {nP->RefTotR++; nP->RefR++;}
}
}
// At this point either we have a node or we do not
//
if (nP)
{hlen = nP->netIF.GetName(hbuff, port, nType) + 1;
nP->RefR++;
STMutex.UnLock();
return hlen != 1;
}
STMutex.UnLock();
return 0;
}
XrdCmsConfig::MaxLoad
int MaxLoad
Definition XrdCmsConfig.hh:86
XrdCmsConfig::sched_RR
char sched_RR
Definition XrdCmsConfig.hh:130
XrdCmsNode::DiskMinF
int DiskMinF
Definition XrdCmsNode.hh:89
XrdCmsNode::DiskFree
int DiskFree
Definition XrdCmsNode.hh:90
XrdCmsNode::hasNet
char hasNet
Definition XrdCmsNode.hh:62
XrdCmsSelector::needNet
char needNet
Definition XrdCmsSelect.hh:147
XrdCmsSelector::selPack
char selPack
Definition XrdCmsSelect.hh:149
XrdCmsSelector::needSpace
char needSpace
Definition XrdCmsSelect.hh:148
XrdNetIF::Mask
char Mask()
Definition XrdNetIF.hh:242
XrdNetIF::GetName
int GetName(const char *&name, ifType ifT=PublicV6)
Definition XrdNetIF.hh:102

References XrdCms::baseFS, XrdCms::Config, XrdCmsNode::DiskFree, XrdCmsNode::DiskMinF, XrdNetIF::GetName(), XrdCmsNode::hasNet, XrdCmsNode::isBad, XrdCmsNode::isNoStage, XrdNetIF::Mask(), XrdCmsSelector::needNet, XrdCmsSelector::needSpace, and XrdCmsSelector::selPack.

Here is the call graph for this function:

## Select() [2/2]

int XrdCmsCluster::Select | ( | XrdCmsSelect & | Sel | ) |

Definition at line 931 of file XrdCmsCluster.cc.

{
EPNAME("Select");
XrdCmsPInfo pinfo;
const char *Amode;
int dowt = 0, retc = 0, isRW, fRD, noSel = (Sel.Opts & XrdCmsSelect::Defer);
SMask_t amask, smask, pmask;
// Establish some local options
//
if (Sel.Opts & XrdCmsSelect::Write)
{isRW = 1; Amode = "write";
if (Config.RWDelay)
if (Sel.Opts & XrdCmsSelect::Create && Config.RWDelay < 2) fRD = 1;
else fRD = 0;
else fRD = 1;
}
else {isRW = 0; Amode = "read"; fRD = 1;}
// Find out who serves this path
//
if (!Cache.Paths.Find(Sel.Path.Val, pinfo)
|| (amask = ((isRW ? pinfo.rwvec : pinfo.rovec) & ~Sel.nmask)) == 0)
{Sel.Resp.DLen = snprintf(Sel.Resp.Data, sizeof(Sel.Resp.Data)-1,
"No servers %s %s access to the file",
(isRW && Config.forceRO ? "allowed" : "have"), Amode)+1;
Sel.Resp.Port = kYR_ENOENT;
return EReplete;
}
// If we are running a shared file system preform an optional restricted
// pre-selection and then do a standard selection. Since all nodes are equal,
// make sure the client is needlessly avoiding them as this signals an error.
//
if (baseFS.isDFS())
{if (Sel.nmask && !(Sel.Opts & XrdCmsSelect::NoTryLim))
{pmask = (isRW ? pinfo.rwvec : pinfo.rovec) & Sel.nmask;
if (!(Sel.Opts & XrdCmsSelect::Online))
pmask |= pinfo.ssvec & Sel.nmask;
if (pmask && maxBits(pmask, baseFS.dfsTries()))
{Sel.Resp.DLen = snprintf(Sel.Resp.Data, sizeof(Sel.Resp.Data)-1,
"Too many DFS %s attempts; operation terminated", Amode)+1;
return RetryErr;
}
}
pmask = amask;
smask = (Sel.Opts & XrdCmsSelect::Online ? 0 : pinfo.ssvec & amask);
if (baseFS.Trim())
{Sel.Resp.DLen = 0;
if (!(retc = SelDFS(Sel, amask, pmask, smask, isRW)))
return (fRD ? Cache.WT4File(Sel,Sel.Vec.hf) : Config.LUPDelay);
if (retc < 0) return retc;
} else if (noSel) return 0;
return SelNode(Sel, pmask, smask);
}
// If either a refresh is wanted or we didn't find the file, re-prime the cache
// which will force the client to wait. Otherwise, compute the primary and
// secondary selections. If there are none, the client may have to wait if we
// have servers that we can query regarding the file. Note that for files being
// opened in write mode, only one writable copy may exist unless this is a
// meta-operation (e.g., remove) in which case the file itself remain unmodified
// or a replica request, in which case we select a new target server.
//
if (!(Sel.Opts & XrdCmsSelect::Refresh)
&& (retc = Cache.GetFile(Sel, pinfo.rovec)))
{if (isRW)
{ if (retc<0) return Config.LUPDelay;
else if (Sel.Opts & XrdCmsSelect::Replica)
{pmask = amask & ~(Sel.Vec.hf | Sel.Vec.bf); smask = 0;
if (!pmask && !Sel.Vec.bf) return SelFail(Sel,eNoRep);
}
else if (Sel.Vec.bf) pmask = smask = 0;
else if (Sel.Vec.hf)
{if (Sel.Opts & XrdCmsSelect::NewFile) return SelFail(Sel,eExists);
if (!(Sel.Opts & XrdCmsSelect::MWFiles))
{if (!(Sel.Opts & XrdCmsSelect::isMeta)
&& maxBits(Sel.Vec.hf,2)) return SelFail(Sel,eDups);
if ((Sel.Vec.hf & pinfo.rwvec)
!= (Sel.Vec.hf & pinfo.rovec)) return SelFail(Sel,eROfs);
}
if (!(pmask = Sel.Vec.hf & amask)) return SelFail(Sel,eNoSel);
smask = 0;
}
else if (Sel.Opts & (XrdCmsSelect::Trunc | XrdCmsSelect::NewFile))
{pmask = amask; smask = 0;}
else if ((smask = pinfo.ssvec & amask)) pmask = 0;
else pmask = smask = 0;
} else {
pmask = Sel.Vec.hf & amask;
if (Sel.Opts & XrdCmsSelect::Online) {pmask &= ~Sel.Vec.pf; smask=0;}
else smask = (retc < 0 ? 0 : pinfo.ssvec & amask);
}
if (Sel.Vec.hf & Sel.nmask) Cache.UnkFile(Sel, Sel.nmask);
} else {
Cache.AddFile(Sel, 0);
Sel.Vec.bf = pinfo.rovec;
Sel.Vec.hf = Sel.Vec.pf = pmask = smask = 0;
retc = 0;
}
// A wait is required if we don't have any primary or seconday servers
//
dowt = (!pmask && !smask);
// If we can query additional servers, do so now. The client will be placed
// in the callback queue only if we have no possible selections
//
if (Sel.Vec.bf)
{CmsStateRequest QReq = {{Sel.Path.Hash, kYR_state, kYR_raw, 0}};
if (Sel.Opts & XrdCmsSelect::Refresh)
QReq.Hdr.modifier |= CmsStateRequest::kYR_refresh;
if (dowt) retc= (fRD ? Cache.WT4File(Sel,Sel.Vec.hf) : Config.LUPDelay);
TRACE(Files, "seeking " <<Sel.Path.Val);
amask = Cluster.Broadcast(Sel.Vec.bf, QReq.Hdr,
(void *)Sel.Path.Val,Sel.Path.Len+1);
if (amask) Cache.UnkFile(Sel, amask);
if (dowt) return retc;
} else if (dowt && retc < 0 && !noSel)
return (fRD ? Cache.WT4File(Sel,Sel.Vec.hf) : Config.LUPDelay);
// Broadcast a freshen up request if wanted
//
if ((Sel.Opts & XrdCmsSelect::Freshen) && (amask = pmask & ~Sel.Vec.bf))
{CmsStateRequest Qupt={{0,kYR_state,(kXR_char)kYR_raw|(kXR_char)CmsStateRequest::kYR_noresp,0}};
Cluster.Broadcast(amask, Qupt.Hdr,(void *)Sel.Path.Val,Sel.Path.Len+1);
}
// If we need to defer selection, simply return as this is a mindless prepare
//
if (noSel) return 0;
// Check if we have no useable servers
//
if (dowt) return Unuseable(Sel);
// Check if should eliminate staging servers. We may need to do this if the
// client has been eliminating too many of them as they all should be equal.
//
if (Sel.nmask && pinfo.ssvec && !(Sel.Opts & XrdCmsSelect::NoTryLim)
&& maxBits(Sel.nmask & pinfo.ssvec, baseFS.stgTries()))
{if (!pmask)
{Sel.Resp.DLen = snprintf(Sel.Resp.Data, sizeof(Sel.Resp.Data)-1,
"Too many attempts to stage %s access to the file", Amode)+1;
return RetryErr;
}
smask = 0;
}
// Select a node
//
return SelNode(Sel, pmask, smask);
}
kXR_char
unsigned char kXR_char
Definition XPtypes.hh:65
XrdCmsBaseFS::dfsTries
int dfsTries()
Definition XrdCmsBaseFS.hh:91
XrdCmsBaseFS::stgTries
int stgTries()
Definition XrdCmsBaseFS.hh:143
XrdCmsBaseFS::Trim
int Trim()
Definition XrdCmsBaseFS.hh:145
XrdCmsCluster::EReplete
static const int EReplete
Definition XrdCmsCluster.hh:191
XrdCmsCluster::RetryErr
static const int RetryErr
Definition XrdCmsCluster.hh:190
XrdCmsConfig::RWDelay
int RWDelay
Definition XrdCmsConfig.hh:78
XrdCmsConfig::forceRO
bool forceRO
Definition XrdCmsConfig.hh:126
XrdCmsSelect::Write
@ Write
Definition XrdCmsSelect.hh:56
XrdCmsSelect::NoTryLim
@ NoTryLim
Definition XrdCmsSelect.hh:69
XrdCmsSelect::Defer
@ Defer
Definition XrdCmsSelect.hh:61
XrdCmsSelect::Replica
@ Replica
Definition XrdCmsSelect.hh:68
XrdCmsSelect::MWFiles
@ MWFiles
Definition XrdCmsSelect.hh:70
XrdCmsSelect::NewFile
@ NewFile
Definition XrdCmsSelect.hh:57
XrdCmsSelect::Trunc
@ Trunc
Definition XrdCmsSelect.hh:59
XrdCmsSelect::Create
@ Create
Definition XrdCmsSelect.hh:60
XrdCmsSelect::isMeta
@ isMeta
Definition XrdCmsSelect.hh:66
XrdCmsSelect::Freshen
@ Freshen
Definition XrdCmsSelect.hh:67
XrdCmsSelect::nmask
SMask_t nmask
Definition XrdCmsSelect.hh:48
XrdCms::kYR_ENOENT
@ kYR_ENOENT
Definition YProtocol.hh:150
XrdCms::CmsStateRequest::kYR_noresp
@ kYR_noresp
Definition YProtocol.hh:553

References XrdCms::baseFS, XrdCms::Cache, XrdCms::Cluster, XrdCms::Config, XrdCmsSelect::Create, XrdCmsSelect::Defer, EPNAME, EReplete, XrdCmsSelect::Freshen, XrdCmsKey::Hash, XrdCms::CmsStateRequest::Hdr, XrdCmsSelect::isMeta, XrdCms::kYR_ENOENT, XrdCms::CmsStateRequest::kYR_noresp, XrdCms::kYR_raw, XrdCms::CmsStateRequest::kYR_refresh, XrdCms::kYR_state, XrdCmsKey::Len, XrdCms::CmsRRHdr::modifier, XrdCmsSelect::MWFiles, XrdCmsSelect::NewFile, XrdCmsSelect::nmask, XrdCmsSelect::NoTryLim, XrdCmsSelect::Online, XrdCmsSelect::Opts, XrdCmsSelect::Path, XrdCmsSelect::Refresh, XrdCmsSelect::Replica, XrdCmsSelect::Resp, RetryErr, XrdCmsPInfo::rovec, XrdCmsPInfo::rwvec, XrdCmsPInfo::ssvec, TRACE, XrdCmsSelect::Trunc, XrdCmsKey::Val, XrdCmsSelect::Vec, and XrdCmsSelect::Write.

## SLock()

void XrdCmsCluster::SLock | ( | bool | dolock,
|  | bool | wrmode = true )

inline

Definition at line 200 of file XrdCmsCluster.hh.

{if (dolock)
{if (wrmode) STMutex.WriteLock();
else STMutex.ReadLock();
}
else STMutex.UnLock();
}

## Space()

void XrdCmsCluster::Space | ( | XrdCms::SpaceData & | sData,
|  | SMask_t | smask )

Definition at line 1216 of file XrdCmsCluster.cc.

{
XrdCmsNode *nP;
SMask_t bmask;
int i;
bool doAll = !baseFS.isDFS();
// Obtain a lock on the table and screen out peer nodes
//
STMutex.ReadLock();
bmask = smask & peerMask;
// Run through the table getting space information
//
for (i = 0; i <= STHi; i++)
if ((nP = NodeTab[i]) && nP->isNode(bmask) && !(nP->isOffline))
{if (doAll || !sData.Total)
{sData.Total += nP->DiskTotal;
sData.TotFr += nP->DiskFree;
}
if (nP->isRW & XrdCmsNode::allowsSS)
{sData.sNum++;
if (sData.sFree < nP->DiskFree)
{sData.sFree = nP->DiskFree; sData.sUtil = nP->DiskUtil;}
}
if (nP->isRW & XrdCmsNode::allowsRW)
{sData.wNum++;
if (sData.wFree < nP->DiskFree)
{sData.wFree = nP->DiskFree; sData.wUtil = nP->DiskUtil;
sData.wMinF = nP->DiskMinF;
}
}
}
STMutex.UnLock();
}
XrdCmsNode::allowsRW
static const char allowsRW
Definition XrdCmsNode.hh:84
XrdCmsNode::allowsSS
static const char allowsSS
Definition XrdCmsNode.hh:85
XrdCmsNode::DiskUtil
int DiskUtil
Definition XrdCmsNode.hh:91
XrdCmsNode::DiskTotal
unsigned int DiskTotal
Definition XrdCmsNode.hh:87
XrdCms::SpaceData::wNum
int wNum
Definition XrdCmsCluster.hh:90
XrdCms::SpaceData::wFree
int wFree
Definition XrdCmsCluster.hh:89
XrdCms::SpaceData::sNum
int sNum
Definition XrdCmsCluster.hh:93
XrdCms::SpaceData::wUtil
int wUtil
Definition XrdCmsCluster.hh:91
XrdCms::SpaceData::sFree
int sFree
Definition XrdCmsCluster.hh:92
XrdCms::SpaceData::wMinF
int wMinF
Definition XrdCmsCluster.hh:88
XrdCms::SpaceData::sUtil
int sUtil
Definition XrdCmsCluster.hh:94
XrdCms::SpaceData::Total
long long Total
Definition XrdCmsCluster.hh:86
XrdCms::SpaceData::TotFr
long long TotFr
Definition XrdCmsCluster.hh:87

References XrdCmsNode::allowsRW, XrdCmsNode::allowsSS, XrdCms::baseFS, XrdCmsNode::DiskFree, XrdCmsNode::DiskMinF, XrdCmsNode::DiskTotal, XrdCmsNode::DiskUtil, XrdCmsNode::isNode(), XrdCmsNode::isOffline, XrdCmsNode::isRW, XrdCms::SpaceData::sFree, XrdCms::SpaceData::sNum, XrdCms::SpaceData::sUtil, XrdCms::SpaceData::Total, XrdCms::SpaceData::TotFr, XrdCms::SpaceData::wFree, XrdCms::SpaceData::wMinF, XrdCms::SpaceData::wNum, and XrdCms::SpaceData::wUtil.

Here is the call graph for this function:

## Stats()

int XrdCmsCluster::Stats | ( | char * | bfr,
|  | int | bln )

Definition at line 1256 of file XrdCmsCluster.cc.

{
static const char statfmt1[] = "<stats id=\"cms\">"
"<role>%s</role></stats>";
int mlen;
// Check if actual length wanted
//
if (!bfr) return sizeof(statfmt1) + 8;
// Format the statistics (not much here for now)
//
mlen = snprintf(bfr, bln, statfmt1, Config.myRType);
if ((bln -= mlen) <= 0) return 0;
return mlen;
}
XrdCmsConfig::myRType
char myRType[4]
Definition XrdCmsConfig.hh:169

References XrdCms::Config.

## Statt()

int XrdCmsCluster::Statt | ( | char * | bfr,
|  | int | bln )

Definition at line 1278 of file XrdCmsCluster.cc.

{
static const char statfmt0[] = "</stats>";
static const char statfmt1[] = "<stats id=\"cmsm\">"
"<role>%s</role><sel><t>%lld</t><r>%lld</r><w>%lld</w></sel>"
"<node>%d";
static const char statfmt2[] = "<stats id=\"%d\">"
"<host>%s</host><role>%s</role>"
"<run>%s</run><ref><r>%d</r><w>%d</w></ref>%s</stats>";
static const char statfmt3[] = "<shr>%d<use>%d</use></shr>";
static const char statfmt4[] = "</node>";
static const char statfmt5[] =
"<frq><add>%lld<d>%lld</d></add><rsp>%lld<m>%lld</m></rsp>"
"<lf>%lld</lf><ls>%lld</ls><rf>%lld</rf><rs>%lld</rs></frq>";
static int AddFrq = (Config.RepStats & XrdCmsConfig::RepStat_frq);
static int AddShr = (Config.RepStats & XrdCmsConfig::RepStat_shr)
&& Config.asMetaMan();
XrdCmsRRQ::Info Frq;
XrdCmsSelected *sp;
int mlen, tlen, n = 0;
char shrBuff[80], stat[6], *stp;
bool oksel;
class spmngr {
public: XrdCmsSelected *sp;
spmngr() {sp = 0;}
~spmngr() {XrdCmsSelected *xsp;
while((xsp = sp)) {sp = sp->next; delete xsp;}
}
} mngrsp;
// Check if actual length wanted
//
if (!bfr)
{n = sizeof(statfmt0) +
sizeof(statfmt1) + 12*3 + 3 + 3 +
(sizeof(statfmt2) + 10*2 + 256 + 16) * STMax + sizeof(statfmt4);
if (AddShr) n += sizeof(statfmt3) + 12;
if (AddFrq) n += sizeof(statfmt4) + (10*8);
return n;
}
// Get the statistics
//
if (AddFrq) RRQ.Statistics(Frq);
mngrsp.sp = sp = List(FULLMASK, LS_NULL, oksel);
// Count number of nodes we have
//
while(sp) {n++; sp = sp->next;}
sp = mngrsp.sp;
// Format the statistics
//
long long lclTcnt = SelTcnt, lclRtot = SelRtot, lclWtot = SelWtot;
mlen = snprintf(bfr, bln, statfmt1,
Config.myRType, lclTcnt, lclRtot, lclWtot, n);
if ((bln -= mlen) <= 0) return 0;
tlen = mlen; bfr += mlen; n = 0; *shrBuff = 0;
while(sp && bln > 0)
{stp = stat;
if (sp->Status & XrdCmsSelected::Offline) *stp++ = 'o';
else if (sp->Status & XrdCmsSelected::Suspend) *stp++ = 's';
else if (sp->Status & XrdCmsSelected::Disable) *stp++ = 'd';
else *stp++ = 'a';
if (sp->Status & XrdCmsSelected::isRW) *stp++ = 'w';
if (sp->Status & XrdCmsSelected::NoStage) *stp++ = 'n';
*stp = 0;
if (AddShr) snprintf(shrBuff, sizeof(shrBuff), statfmt3,
(sp->Share ? sp->Share : 100), sp->Shrin);
mlen = snprintf(bfr, bln, statfmt2, n, sp->Ident,
XrdCmsRole::Type(static_cast<XrdCmsRole::RoleID>(sp->RoleID)),
stat, sp->RefTotR, sp->RefTotW, shrBuff);
bfr += mlen; bln -= mlen; tlen += mlen;
sp = sp->next; n++;
}
if (bln <= (int)sizeof(statfmt4)) return 0;
strcpy(bfr, statfmt4); mlen = sizeof(statfmt4) - 1;
bfr += mlen; bln -= mlen; tlen += mlen;
if (AddFrq && bln > 0)
{mlen = snprintf(bfr, bln, statfmt5, Frq.Add2Q, Frq.PBack, Frq.Resp,
Frq.Multi, Frq.luFast, Frq.luSlow, Frq.rdFast, Frq.rdSlow);
bfr += mlen; bln -= mlen; tlen += mlen;
}
// See if we overflowed. otherwise finish up
//
if (sp || bln < (int)sizeof(statfmt0)) return 0;
strcpy(bfr, statfmt0);
return tlen + sizeof(statfmt0) - 1;
}
FULLMASK
#define FULLMASK
Definition XrdCmsTypes.hh:35
stat
#define stat(a, b)
Definition XrdPosix.hh:101
XrdCmsCluster::List
XrdCmsSelected * List(SMask_t mask, CmsLSOpts opts, bool &oksel)
Definition XrdCmsCluster.cc:533
XrdCmsConfig::RepStat_shr
static const int RepStat_shr
Definition XrdCmsConfig.hh:209
XrdCmsConfig::RepStat_frq
static const int RepStat_frq
Definition XrdCmsConfig.hh:208
XrdCmsConfig::asMetaMan
int asMetaMan()
Definition XrdCmsConfig.hh:67
XrdCmsConfig::RepStats
short RepStats
Definition XrdCmsConfig.hh:166
XrdCmsRRQ::Statistics
void Statistics(Info &Data)
Definition XrdCmsRRQ.hh:144
XrdCmsRole::RoleID
RoleID
Definition XrdCmsRole.hh:41
XrdCmsRole::Type
static const char * Type(RoleID rid)
Definition XrdCmsRole.hh:78
XrdCmsSelected::RefTotW
int RefTotW
Definition XrdCmsSelect.hh:116
XrdCmsSelected::RoleID
char RoleID
Definition XrdCmsSelect.hh:120
XrdCmsSelected::Shrin
int Shrin
Definition XrdCmsSelect.hh:118
XrdCmsSelected::Share
char Share
Definition XrdCmsSelect.hh:119
XrdCmsSelected::Status
int Status
Definition XrdCmsSelect.hh:122
XrdCmsSelected::Ident
char Ident[IdentSize]
Definition XrdCmsSelect.hh:114
XrdCmsSelected::next
XrdCmsSelected * next
Definition XrdCmsSelect.hh:110
XrdCmsSelected::RefTotR
int RefTotR
Definition XrdCmsSelect.hh:117
XrdCms::RRQ
XrdCmsRRQ RRQ
Definition XrdCmsRRQ.cc:55
XrdCmsRRQ::Info::luSlow
long long luSlow
Definition XrdCmsRRQ.hh:139
XrdCmsRRQ::Info::rdSlow
long long rdSlow
Definition XrdCmsRRQ.hh:141
XrdCmsRRQ::Info::Resp
long long Resp
Definition XrdCmsRRQ.hh:136
XrdCmsRRQ::Info::luFast
long long luFast
Definition XrdCmsRRQ.hh:138
XrdCmsRRQ::Info::Add2Q
long long Add2Q
Definition XrdCmsRRQ.hh:134
XrdCmsRRQ::Info::Multi
long long Multi
Definition XrdCmsRRQ.hh:137
XrdCmsRRQ::Info::rdFast
long long rdFast
Definition XrdCmsRRQ.hh:140
XrdCmsRRQ::Info::PBack
long long PBack
Definition XrdCmsRRQ.hh:135

References XrdCmsRRQ::Info::Add2Q, XrdCms::Config, XrdCmsSelected::Disable, FULLMASK, XrdCmsSelected::Ident, XrdCmsSelected::isRW, List(), LS_NULL, XrdCmsRRQ::Info::luFast, XrdCmsRRQ::Info::luSlow, XrdCmsRRQ::Info::Multi, XrdCmsSelected::next, XrdCmsSelected::NoStage, XrdCmsSelected::Offline, XrdCmsRRQ::Info::PBack, XrdCmsRRQ::Info::rdFast, XrdCmsRRQ::Info::rdSlow, XrdCmsSelected::RefTotR, XrdCmsSelected::RefTotW, XrdCmsConfig::RepStat_frq, XrdCmsConfig::RepStat_shr, XrdCmsRRQ::Info::Resp, XrdCmsSelected::RoleID, XrdCms::RRQ, XrdCmsSelected::Share, XrdCmsSelected::Shrin, stat, XrdCmsSelected::Status, STMax, XrdCmsSelected::Suspend, and XrdCmsRole::Type().

Here is the call graph for this function:

## Friends And Related Symbol Documentation

## XrdCmsDrop

friend class XrdCmsDrop

friend

Definition at line 117 of file XrdCmsCluster.hh.

References XrdCmsDrop.

Referenced by Remove(), Remove(), and XrdCmsDrop.

## Member Data Documentation

## EReplete

const int XrdCmsCluster::EReplete = -4

static

Definition at line 191 of file XrdCmsCluster.hh.

Referenced by XrdCmsNode::do_SelAvoid(), XrdCmsNode::do_Select(), and Select().

## NodeCnt

int XrdCmsCluster::NodeCnt

Definition at line 119 of file XrdCmsCluster.hh.

Referenced by XrdCmsCluster(), Add(), and Remove().

## NotFound

const int XrdCmsCluster::NotFound = -1

static

Definition at line 188 of file XrdCmsCluster.hh.

Referenced by Locate().

## RetryErr

const int XrdCmsCluster::RetryErr = -3

static

Definition at line 190 of file XrdCmsCluster.hh.

Referenced by XrdCmsNode::do_Select(), and Select().

## Wait4CBk

const int XrdCmsCluster::Wait4CBk = -2

static

Definition at line 189 of file XrdCmsCluster.hh.

Referenced by XrdCmsNode::do_Locate(), and Locate().

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

- XrdCmsCluster.hh
- XrdCmsCluster.cc