XRootD
Loading...
Searching...
No Matches
XrdPosixFile Class Reference

#include <XrdPosixFile.hh>

Inheritance diagram for XrdPosixFile:
Collaboration diagram for XrdPosixFile:

Public Member Functions

 XrdPosixFile (bool &aOK, const char *path, XrdPosixCallBack *cbP=0, int Opts=0)
 ~XrdPosixFile ()
long long addOffset (long long offs, int updtSz=0)
bool Close (XrdCl::XRootDStatus &Status)
bool Detach (XrdOucCacheIOCD &cdP) override
void DetachDone () override
 Indicate that the CacheIO object has been detached.
int Fcntl (XrdOucCacheOp::Code opc, const std::string &args, std::string &resp) override
bool Finalize (XrdCl::XRootDStatus *Status)
long long FSize () override
int Fstat (struct stat &buf) override
void HandleResponse (XrdCl::XRootDStatus *status, XrdCl::AnyObject *response) override
const char * Location (bool refresh=false) override
long long Offset ()
const char * Origin ()
const char * Path () override
int pgRead (char *buff, long long offs, int rdlen, std::vector< uint32_t > &csvec, uint64_t opts=0, int *csfix=0) override
void pgRead (XrdOucCacheIOCB &iocb, char *buff, long long offs, int rdlen, std::vector< uint32_t > &csvec, uint64_t opts=0, int *csfix=0) override
int pgWrite (char *buff, long long offs, int wrlen, std::vector< uint32_t > &csvec, uint64_t opts=0, int *csfix=0) override
void pgWrite (XrdOucCacheIOCB &iocb, char *buff, long long offs, int wrlen, std::vector< uint32_t > &csvec, uint64_t opts=0, int *csfix=0) override
int Read (char *Buff, long long Offs, int Len) override
void Read (XrdOucCacheIOCB &iocb, char *buff, long long offs, int rlen) override
int ReadV (const XrdOucIOVec *readV, int n) override
void ReadV (XrdOucCacheIOCB &iocb, const XrdOucIOVec *readV, int n) override
long long setOffset (long long offs)
bool Stat (XrdCl::XRootDStatus &Status, bool force=false)
int Sync () override
void Sync (XrdOucCacheIOCB &iocb) override
int Trunc (long long Offset) override
void updLock ()
void UpdtSize (size_t newsz)
void updUnLock ()
virtual bool Who (XrdPosixDir **dirP)
bool Who (XrdPosixFile **fileP) override
int Write (char *Buff, long long Offs, int Len) override
void Write (XrdOucCacheIOCB &iocb, char *buff, long long offs, int wlen) override
Public Member Functions inherited from XrdPosixObject
 XrdPosixObject ()
virtual ~XrdPosixObject ()
bool AssignFD (bool isStream=false)
int FDNum ()
XrdOucECMsggetECMsg ()
void Lock (bool wr=true)
void Ref ()
int Refs ()
void UnLock ()
void unRef ()
Public Member Functions inherited from XrdOucCacheIO
 XrdOucCacheIO ()
 Construct and Destructor.
virtual void Preread (aprParms &Parms)
virtual void Preread (long long offs, int rlen, int opts=0)
virtual void Preread (XrdOucRangeList &rlist)
virtual void Trunc (XrdOucCacheIOCB &iocb, long long offs)
virtual void Update (XrdOucCacheIO &iocp)
virtual int WriteV (const XrdOucIOVec *writV, int wnum)
virtual void WriteV (XrdOucCacheIOCB &iocb, const XrdOucIOVec *writV, int wnum)
Public Member Functions inherited from XrdOucCacheIOCD
 XrdOucCacheIOCD ()
virtual ~XrdOucCacheIOCD ()
Public Member Functions inherited from XrdCl::ResponseHandler
virtual ~ResponseHandler ()
virtual void HandleResponseWithHosts (XRootDStatus *status, AnyObject *response, HostList *hostList)

Static Public Member Functions

static void * DelayedDestroy (void *)
static void DelayedDestroy (XrdPosixFile *fp)
Static Public Member Functions inherited from XrdPosixObject
static bool CanStream ()
static XrdPosixDirDir (int fildes, bool glk=false)
static XrdPosixFileFile (int fildes, bool glk=false)
static int Init (int numfd)
static void Release (XrdPosixObject *oP, bool needlk=true)
static XrdPosixDirReleaseDir (int fildes)
static XrdPosixFileReleaseFile (int fildes)
static void Shutdown ()
static bool Valid (int fd)
Static Public Member Functions inherited from XrdCl::ResponseHandler
static ResponseHandlerWrap (std::function< void(XRootDStatus &, AnyObject &)> func)
static ResponseHandlerWrap (std::function< void(XRootDStatus *, AnyObject *)> func)

Public Attributes

XrdCl::File clFile
time_t myAtime
time_t myCtime
ino_t myInode
mode_t myMode
time_t myMtime
dev_t myRdev
size_t mySize
XrdPosixPrepIOPrepIO
XrdOucCacheIOXCio
Public Attributes inherited from XrdPosixObject
XrdOucECMsg ecMsg

Static Public Attributes

static XrdPosixFileddList = InitDDL()
static XrdPosixFileddLost = 0
static XrdSysMutex ddMutex
static int ddNum = 0
static bool ddPosted = false
static XrdSysSemaphore ddSem
static const int isStrm = 2
static const int isUpdt = 4
static const int realFD = 1
static char * sfSFX = 0
static short sfSLN = 0
Static Public Attributes inherited from XrdOucCacheIO
static const uint64_t forceCS = 0x0000000000000001ULL
static const int SingleUse = 0x0001
 Mark pages for single use.

Additional Inherited Members

Protected Member Functions inherited from XrdOucCacheIO
virtual ~XrdOucCacheIO ()
Protected Attributes inherited from XrdPosixObject
int fdNum
XrdSysRWLock objMutex
int refCnt
XrdSysRecMutex updMutex

Detailed Description

Definition at line 58 of file XrdPosixFile.hh.

Constructor & Destructor Documentation

◆ XrdPosixFile()

XrdPosixFile::XrdPosixFile ( bool & aOK,
const char * path,
XrdPosixCallBack * cbP = 0,
int Opts = 0 )

Definition at line 121 of file XrdPosixFile.cc.

123 : XCio((XrdOucCacheIO *)this), PrepIO(0),
124 mySize(0), myAtime(0), myCtime(0), myMtime(0), myRdev(0),
125 myInode(0), myMode(0), theCB(cbP), fLoc(0), cOpt(0),
126 isStream(Opts & isStrm ? 1 : 0)
127{
128// Handle path generation. This is trickt as we may have two namespaces. One
129// for the origin and one for the cache.
130//
131 fOpen = strdup(path); aOK = true;
133 else if (!XrdPosixXrootPath::P2L("file",path,fPath)) aOK = false;
134 else if (!fPath) fPath = fOpen;
135
136// Check for structured file check
137//
138 if (sfSFX)
139 {int n = strlen(path);
140 if (n > sfSLN && !strcmp(sfSFX, path + n - sfSLN))
141 cOpt = XrdOucCache::optFIS;
142 }
143
144// Set cache update option
145//
146 if (Opts & isUpdt) cOpt |= XrdOucCache::optRW;
147}
XrdOucCacheIO()
Construct and Destructor.
static const int optRW
File is read/write (o/w read/only).
static const int optFIS
File is structured (e.g. root file).
static char * sfSFX
static const int isUpdt
static const int isStrm
XrdPosixPrepIO * PrepIO
static short sfSLN
XrdOucCacheIO * XCio
static const char * P2L(const char *who, const char *inP, char *&relP, bool ponly=false)
XrdOucCache * theCache
XrdOucName2Name * theN2N

References XrdOucCacheIO::XrdOucCacheIO(), isStrm, isUpdt, myAtime, myCtime, myInode, myMode, myMtime, myRdev, mySize, XrdOucCache::optFIS, XrdOucCache::optRW, XrdPosixXrootPath::P2L(), PrepIO, sfSFX, sfSLN, XrdPosixGlobals::theCache, XrdPosixGlobals::theN2N, and XCio.

Referenced by DelayedDestroy(), DelayedDestroy(), and Who().

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

◆ ~XrdPosixFile()

XrdPosixFile::~XrdPosixFile ( )

Definition at line 153 of file XrdPosixFile.cc.

154{
155// Close the remote connection
156//
157 if (clFile.IsOpen())
159 XrdCl::XRootDStatus status = clFile.Close();
160 if (!status.IsOK())
162 }
163
164// Get rid of deferred open object
165//
166 if (PrepIO) delete PrepIO;
167
168// Free the path and location information
169//
170 if (fPath) free(fPath);
171 if (fOpen != fPath) free(fOpen);
172 if (fLoc) free(fLoc);
173}
XrdCl::File clFile
void Count(long long &Dest)
XrdPosixStats Stats
bool IsOK() const
We're fine.

References clFile, XrdCl::Status::IsOK(), PrepIO, and XrdPosixGlobals::Stats.

Here is the call graph for this function:

Member Function Documentation

◆ addOffset()

long long XrdPosixFile::addOffset ( long long offs,
int updtSz = 0 )
inline

Definition at line 69 of file XrdPosixFile.hh.

70 {updMutex.Lock();
71 currOffset += offs;
72 if (updtSz && currOffset > (long long)mySize)
73 mySize = currOffset;
74 long long retOffset = currOffset;
75 updMutex.UnLock();
76 return retOffset;
77 }
XrdSysRecMutex updMutex

References mySize, and XrdPosixObject::updMutex.

Referenced by XrdPosixXrootd::Lseek(), XrdPosixXrootd::Read(), and XrdPosixXrootd::Write().

Here is the caller graph for this function:

◆ Close()

bool XrdPosixFile::Close ( XrdCl::XRootDStatus & Status)

Definition at line 310 of file XrdPosixFile.cc.

311{
312// If this is a deferred open, disable any future calls as we are ready to
313// shutdown this beast!
314//
315 if (PrepIO) PrepIO->Disable();
316
317// If we don't need to close the file, then return success. Otherwise, do the
318// actual close and return the status. We should have already been removed
319// from the file table at this point and should be unlocked.
320//
321 if (clFile.IsOpen())
323 Status = clFile.Close();
324 if (Status.IsOK()) return true;
326 return false;
327 }
328 return true;
329}

References clFile, XrdCl::Status::IsOK(), PrepIO, and XrdPosixGlobals::Stats.

Referenced by XrdPosixXrootd::Close(), and DelayedDestroy().

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

◆ DelayedDestroy() [1/2]

void * XrdPosixFile::DelayedDestroy ( void * vpf)
static

Definition at line 179 of file XrdPosixFile.cc.

180{
181// Static function.
182// Called within a dedicated thread if there is a reference outstanding to the
183// file or the file cannot be closed in a clean fashion for some reason.
184//
185 EPNAME("DDestroy");
186
187 XrdSysError *Say = XrdPosixGlobals::eDest;
188 XrdCl::XRootDStatus Status;
189 std::string statusMsg;
190 const char *eTxt;
191 XrdPosixFile *fCurr, *fNext;
192 char buff[512], buff2[256];
193 static int ddNumLost = 0;
194 int ddCount, refNum;
195 bool doWait = false;
196
197// Wait for active I/O to complete
198//
199do{if (doWait)
201 doWait = false;
202 } else {
203 ddSem.Wait();
204 doWait = true;
205 continue;
206 }
207
208// Grab the delayed delete list
209//
210 ddMutex.Lock();
211 fNext=ddList; ddList=0; ddPosted=false; ddCount = ddNum; ddNum = 0;
212 ddMutex.UnLock();
213
214// Do some debugging
215//
216 DEBUG("DLY destroy of "<<ddCount<<" objects; "<<ddNumLost <<" already lost.");
217
218// Try to delete all the files on the list. If we exceeded the try limit,
219// remove the file from the list and let it sit forever.
220//
221 int nowLost = ddNumLost;
222 while((fCurr = fNext))
223 {fNext = fCurr->nextFile;
224 if (!(refNum = fCurr->Refs()))
225 {if (fCurr->Close(Status) || !fCurr->clFile.IsOpen())
226 {delete fCurr; ddCount--; continue;}
227 else {statusMsg = Status.ToString();
228 eTxt = statusMsg.c_str();
229 }
230 } else eTxt = 0;
231
232 if (fCurr->numTries > XrdPosixGlobals::ddMaxTries)
233 {ddNumLost++; ddCount--;
234 if (!eTxt)
235 {snprintf(buff2, sizeof(buff2), "in use %d", refNum);
236 eTxt = buff2;
237 }
238 if (Say)
239 {snprintf(buff, sizeof(buff), "%s timeout closing", eTxt);
240 Say->Emsg("DDestroy", buff, obfuscateAuth(fCurr->Origin()).c_str());
241 } else {
242 DMSG("DDestroy", eTxt <<" timeout closing " << obfuscateAuth(fCurr->Origin())
243 <<' ' <<ddNumLost <<" objects lost");
244 }
245 fCurr->nextFile = ddLost;
246 ddLost = fCurr;
247 } else {
248 fCurr->numTries++;
249 doWait = true;
250 ddMutex.Lock();
251 fCurr->nextFile = ddList; ddList = fCurr;
252 ddNum++; ddPosted = true;
253 ddMutex.UnLock();
254 }
255 }
256 if (Say && ddNumLost - nowLost >= 3)
257 {snprintf(buff, sizeof(buff), "%d objects deferred and %d lost.",
258 ddCount, ddNumLost);
259 Say->Emsg("DDestroy", buff);
260 } else {
261 DEBUG("DLY destroy end; "<<ddCount<<" objects deferred and "
262 <<ddNumLost <<" lost.");
263 }
264 if (XrdPosixGlobals::theCache && ddNumLost != nowLost)
266 (XrdPosixGlobals::theCache->Statistics.X.ClosedLost), ddNumLost);
267 } while(true);
268
269 return 0;
270}
#define DEBUG(x)
#define EPNAME(x)
XrdOucPup XrdCmsParser::Pup & Say
std::string obfuscateAuth(const std::string &input)
#define DMSG(x, y)
bool IsOpen() const
Check if the file is open.
Definition XrdClFile.cc:962
void Set(XrdOucCacheStats &S)
XrdOucCacheStats Statistics
XrdPosixFile(bool &aOK, const char *path, XrdPosixCallBack *cbP=0, int Opts=0)
static XrdSysSemaphore ddSem
static XrdSysMutex ddMutex
const char * Origin()
static XrdPosixFile * ddLost
static bool ddPosted
static int ddNum
bool Close(XrdCl::XRootDStatus &Status)
static XrdPosixFile * ddList
static void Snooze(int seconds)
XrdSysError * eDest
std::string ToString() const
Create a string representation.

References XrdPosixFile(), clFile, Close(), XrdPosixGlobals::ddInterval, ddList, ddLost, XrdPosixGlobals::ddMaxTries, ddMutex, ddNum, ddPosted, ddSem, DEBUG, DMSG, XrdPosixGlobals::eDest, EPNAME, XrdCl::File::IsOpen(), obfuscateAuth(), Origin(), XrdPosixObject::Refs(), Say, XrdSysTimer::Snooze(), XrdPosixGlobals::theCache, and XrdCl::Status::ToString().

Referenced by XrdPosixXrootd::Close().

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

◆ DelayedDestroy() [2/2]

void XrdPosixFile::DelayedDestroy ( XrdPosixFile * fp)
static

Definition at line 274 of file XrdPosixFile.cc.

275{
276 EPNAME("DDestroyFP");
277 int ddCount;
278 bool doPost;
279
280// Count number of times this has happened (we should have a cache)
281//
284 (XrdPosixGlobals::theCache->Statistics.X.ClosDefers));
285
286// Place this file on the delayed delete list
287//
288 ddMutex.Lock();
289 fp->nextFile = ddList;
290 ddList = fp;
291 ddNum++; ddCount = ddNum;
292 if (ddPosted) doPost = false;
293 else {doPost = true;
294 ddPosted = true;
295 }
296 fp->numTries = 0;
297 ddMutex.UnLock();
298
299 if(DEBUGON) {
300 DEBUG("DLY destroy " << (doPost ? "post " : "has ") << ddCount
301 << " objects; added " << obfuscateAuth(fp->Origin()));
302 }
303 if (doPost) ddSem.Post();
304}
#define DEBUGON
void Count(long long &Dest)

References XrdPosixFile(), ddList, ddMutex, ddNum, ddPosted, ddSem, DEBUG, DEBUGON, EPNAME, obfuscateAuth(), Origin(), and XrdPosixGlobals::theCache.

Here is the call graph for this function:

◆ Detach()

bool XrdPosixFile::Detach ( XrdOucCacheIOCD & iocd)
inlineoverridevirtual

Detach this CacheIO object from the cache.

Note
This method must be called instead of using the delete operator since CacheIO objects may have multiple outstanding references and actual deletion may need to be deferred.
Parameters
iocdreference to the detach complete callback object.
Returns
true Deletion can occur immediately. There is no outstanding I/O.
false Deletion must be deferred until it is safe to so from the cache perspective. At which point, the cache will call the DetachDone() method in the passed callback object. No locks may be held with respect to the CacheIO object when this is done to avoid deadlocks.

Implements XrdOucCacheIO.

Definition at line 87 of file XrdPosixFile.hh.

88 {(void)cdP; return true;}

References XrdOucCacheIOCD::XrdOucCacheIOCD().

Here is the call graph for this function:

◆ DetachDone()

void XrdPosixFile::DetachDone ( )
inlineoverridevirtual

Indicate that the CacheIO object has been detached.

Implements XrdOucCacheIOCD.

Definition at line 90 of file XrdPosixFile.hh.

90{unRef();}

References XrdPosixObject::unRef().

Here is the call graph for this function:

◆ Fcntl()

int XrdPosixFile::Fcntl ( XrdOucCacheOp::Code opc,
const std::string & args,
std::string & resp )
overridevirtual

Issue a special file control operation (synchronous).

Parameters
opcThe operation code (one of the enums).
argsThe argument as required by opc.
respWhere the response is to be placed.
Returns
0 upon success or -errno upon failure.

Reimplemented from XrdOucCacheIO.

Definition at line 335 of file XrdPosixFile.cc.

337{
339
340// Make sure we support the operation code
341//
342 switch(opc)
345 break;
346 default: resp = "Unsupported operation code.";
347 return -ENOTSUP;
348 }
349
350// Convert argument to a client buffer
351//
352 uint32_t sz = args.size();
353 if (sz && args[0]) sz++;
354 XrdCl::Buffer theArgs(sz);
355 if (sz) theArgs.Append(args.c_str(), sz);
356
357// We only support the sync version of this, we may need to change that later
358//
359 XrdCl::Buffer* theResp = 0;
360 XrdCl::XRootDStatus Status;
361 Ref();
362 Status = clFile.Fcntl(qCode, theArgs, theResp);
363 unRef();
364
365// Check status, upon error we set errno and return -1
366//
367 if (!Status.IsOK())
368 {if (theResp) delete theResp;
369 return XrdPosixMap::Result(Status,ecMsg,true);
370 }
371
372// Construct the response.
373//
374 if (!theResp || !(sz = theResp->GetSize())) resp = "";
375 else resp.assign(theResp->GetBuffer(), sz);
376
377// All done
378//
379 if (theResp) delete theResp;
380 return 0;
381}
const char * GetBuffer(uint32_t offset=0) const
Get the message buffer.
uint32_t GetSize() const
Get the size of the message.
static int Result(const XrdCl::XRootDStatus &Status, XrdOucECMsg &ecMsg, bool retneg1=false)
XrdOucECMsg ecMsg
Code
XRootD query request codes.
@ FInfo
Query op-dependant file information on FD.

References XrdCl::Buffer::Append(), clFile, XrdPosixObject::ecMsg, XrdCl::QueryCode::FInfo, XrdCl::Buffer::GetBuffer(), XrdCl::Buffer::GetSize(), XrdCl::Status::IsOK(), XrdOucCacheOp::QFinfo, XrdPosixObject::Ref(), XrdPosixMap::Result(), and XrdPosixObject::unRef().

Here is the call graph for this function:

◆ Finalize()

bool XrdPosixFile::Finalize ( XrdCl::XRootDStatus * Status)

Definition at line 387 of file XrdPosixFile.cc.

388{
389 XrdOucCacheIO *ioP;
390
391// Indicate that we are at the start of the file
392//
393 currOffset = 0;
394
395// Complete initialization. If the stat() fails, the caller will unwind the
396// whole open process (ick). In the process get correct I/O vector.
397
398 if (!Status) ioP = (XrdOucCacheIO *)PrepIO;
399 else if (Stat(*Status)) ioP = (XrdOucCacheIO *)this;
400 else return false;
401
402// Setup the cache if it is to be used
403//
406 if (ioP == (XrdOucCacheIO *)PrepIO)
408 (XrdPosixGlobals::theCache->Statistics.X.OpenDefers), 1LL);
409 }
410
411 return true;
412}
struct stat Stat
Definition XrdCks.cc:49
void Add(XrdOucCacheStats &S)
virtual XrdOucCacheIO * Attach(XrdOucCacheIO *ioP, int opts=0)=0

References XrdOucCacheIO::XrdOucCacheIO(), PrepIO, Stat, XrdPosixGlobals::theCache, and XCio.

Referenced by HandleResponse().

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

◆ FSize()

long long XrdPosixFile::FSize ( )
inlineoverridevirtual

Obtain size of the file.

Returns
Size of the file in bytes.

Implements XrdOucCacheIO.

Definition at line 97 of file XrdPosixFile.hh.

99 long long retSize = AtomicGet(mySize);
101 return retSize;
102 }
#define AtomicBeg(Mtx)
#define AtomicGet(x)
#define AtomicEnd(Mtx)

References AtomicBeg, AtomicEnd, AtomicGet, mySize, and XrdPosixObject::updMutex.

◆ Fstat()

int XrdPosixFile::Fstat ( struct stat & sbuff)
overridevirtual

Perform an fstat() operation (defaults to passthrough).

Parameters
sbuffreference to the stat buffer to be filled in. Only fields st_size, st_blocks, st_mtime (st_atime and st_ctime may be set to st_mtime), st_ino, and st_mode need to be set. All other fields are preset and should not be changed.
Returns
<0 - fstat failed, value is -errno. =0 - fstat succeeded, sbuff holds stat information. >0 - fstat could not be done, forward operation to next level.

Reimplemented from XrdOucCacheIO.

Definition at line 418 of file XrdPosixFile.cc.

419{
420 long long theSize;
421
422// The size is treated differently here as it may come from a cache and may
423// actually trigger a file open if the open was deferred.
424//
425 theSize = XCio->FSize();
426 if (theSize < 0) return static_cast<int>(theSize);
427
428// Return what little we can
429//
431 buf.st_size = theSize;
432 buf.st_atime = myAtime;
433 buf.st_ctime = myCtime;
434 buf.st_mtime = myMtime;
435 buf.st_blocks = buf.st_size/512 + buf.st_size%512;
436 buf.st_ino = myInode;
437 buf.st_rdev = myRdev;
438 buf.st_mode = myMode;
439 return 0;
440}
static void initStat(struct stat *buf)

References XrdPosixConfig::initStat(), myAtime, myCtime, myInode, myMode, myMtime, myRdev, stat, and XCio.

Referenced by XrdPosixXrootd::Fstat().

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

◆ HandleResponse()

void XrdPosixFile::HandleResponse ( XrdCl::XRootDStatus * status,
XrdCl::AnyObject * response )
overridevirtual

Called when a response to associated request arrives or an error occurs

Parameters
statusstatus of the request
responsean object associated with the response (request dependent)

Reimplemented from XrdCl::ResponseHandler.

Definition at line 448 of file XrdPosixFile.cc.

450{
451 XrdCl::XRootDStatus Status;
452 XrdPosixCallBack *xeqCB = theCB;
453 int rc = fdNum;
454
455// If no errors occurred, complete the open
456//
457 if (!(status->IsOK())) rc = XrdPosixMap::Result(*status,ecMsg,false);
458 else if (!Finalize(&Status)) rc = XrdPosixMap::Result( Status,ecMsg,false);
459
460// Issue XrdPosixCallBack callback with the correct result. Errors are indicated
461// by result set < 0 (typically -1) and errno set to the error number. In our
462// case, rc is -errno if an error occurred and that is what the callback gets.
463//
464 xeqCB->Complete(rc);
465
466// Finish up
467//
468 delete status;
469 delete response;
470 if (rc < 0) delete this;
471}
virtual void Complete(int Result)=0
bool Finalize(XrdCl::XRootDStatus *Status)

References XrdPosixCallBack::Complete(), XrdPosixObject::ecMsg, XrdPosixObject::fdNum, Finalize(), XrdCl::Status::IsOK(), and XrdPosixMap::Result().

Here is the call graph for this function:

◆ Location()

const char * XrdPosixFile::Location ( bool refresh = false)
overridevirtual

Get the file's location (i.e. endpoint hostname and port)

Parameters
refresh- when true, recomputes the location in case it changed st the location is cached from the previous successful call.
Returns
A pointer to the file's location. It remains valid until the file is closed or Location() is called with refresh set to true. A null string means the file is not open or location is unknown.

Reimplemented from XrdOucCacheIO.

Definition at line 477 of file XrdPosixFile.cc.

478{
479
480// If the file is not open, then we have no location
481//
482 if (!clFile.IsOpen()) return "";
483
484// If we have no location info, get it
485//
486 if (!fLoc || refresh)
487 {std::string currNode;
488 if (clFile.GetProperty(dsProperty, currNode))
489 {if (!fLoc || strcmp(fLoc, currNode.c_str()))
490 {if (fLoc) free(fLoc);
491 fLoc = strdup(currNode.c_str());
492 }
493 } else return "";
494 }
495
496// Return location information
497//
498 return fLoc;
499}

References clFile.

◆ Offset()

long long XrdPosixFile::Offset ( )
inline

Definition at line 115 of file XrdPosixFile.hh.

115{AtomicRet(updMutex, currOffset);}
#define AtomicRet(mtx, x)

References AtomicRet, and XrdPosixObject::updMutex.

Referenced by XrdPosixXrootd::Read(), Trunc(), and XrdPosixXrootd::Write().

Here is the caller graph for this function:

◆ Origin()

const char * XrdPosixFile::Origin ( )
inline

Definition at line 117 of file XrdPosixFile.hh.

117{return fOpen;}

Referenced by XrdPosixXrootd::Close(), DelayedDestroy(), and DelayedDestroy().

Here is the caller graph for this function:

◆ Path()

const char * XrdPosixFile::Path ( )
inlineoverridevirtual

Get the path associated with this object.

Returns
Pointer to the path.

Implements XrdOucCacheIO.

Definition at line 119 of file XrdPosixFile.hh.

119{return fPath;}

◆ pgRead() [1/2]

int XrdPosixFile::pgRead ( char * buff,
long long offs,
int rdlen,
std::vector< uint32_t > & csvec,
uint64_t opts = 0,
int * csfix = 0 )
overridevirtual

Reimplemented from XrdOucCacheIO.

Definition at line 505 of file XrdPosixFile.cc.

511{
512// Do a sync call using the async interface
513//
514 pgioCB pgrCB("Posix pgRead CB");
515 pgRead(pgrCB, buff, offs, rlen, csvec, opts, csfix);
516 return pgrCB.Wait4PGIO();
517}
struct myOpts opts
int pgRead(char *buff, long long offs, int rdlen, std::vector< uint32_t > &csvec, uint64_t opts=0, int *csfix=0) override

References opts, and pgRead().

Referenced by pgRead().

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

◆ pgRead() [2/2]

void XrdPosixFile::pgRead ( XrdOucCacheIOCB & iocb,
char * buff,
long long offs,
int rdlen,
std::vector< uint32_t > & csvec,
uint64_t opts = 0,
int * csfix = 0 )
overridevirtual

Read file pages and checksums using asynchronous I/O (default sync).

Parameters
iocbreference to the callback object that receives the result. All results are returned via this object's Done() method. If the caller holds any locks they must be recursive locks as the callback may occur on the calling thread.
buffpointer to buffer where the bytes are to be placed.
offsThe offset where the read is to start.
rdlenThe number of bytes to read.
csvecA vector which will be filled with the corresponding CRC32C checksum for each page or page segment.
optsProcessing options: forceCS - always return checksums even when not available.
csfixWhen not nil, returns the number of corrected checksum errs.

Reimplemented from XrdOucCacheIO.

Definition at line 521 of file XrdPosixFile.cc.

528{
529 XrdCl::XRootDStatus Status;
530 XrdPosixFileRH *rhP;
531
532// Allocate callback object. Note the response handler may do additional post
533// processing.
534//
535 rhP = XrdPosixFileRH::Alloc(&iocb, this, offs, rlen, XrdPosixFileRH::isReadP);
536
537// Set the destination checksum vector
538//
539 if (csfix) *csfix = 0;
540 rhP->setCSVec(&csvec, csfix, (opts & XrdOucCacheIO::forceCS) != 0);
541
542// Issue read
543//
544 Ref();
545 Status = clFile.PgRead((uint64_t)offs,(uint32_t)rlen,buff,rhP);
546
547// Check status, upon error we pass -errno as the result.
548//
549 if (!Status.IsOK())
550 {rhP->Sched(XrdPosixMap::Result(Status, ecMsg, false));
551 unRef();
552 }
553}
static const uint64_t forceCS
void setCSVec(std::vector< uint32_t > *csv, int *csf, bool fcs=false)
void Sched(int result)
static XrdPosixFileRH * Alloc(XrdOucCacheIOCB *cbp, XrdPosixFile *fp, long long offs, int xResult, ioType typeIO)

References XrdPosixFileRH::Alloc(), clFile, XrdPosixObject::ecMsg, XrdOucCacheIO::forceCS, XrdCl::Status::IsOK(), XrdPosixFileRH::isReadP, opts, XrdPosixObject::Ref(), XrdPosixMap::Result(), XrdPosixFileRH::Sched(), XrdPosixFileRH::setCSVec(), and XrdPosixObject::unRef().

Here is the call graph for this function:

◆ pgWrite() [1/2]

int XrdPosixFile::pgWrite ( char * buff,
long long offs,
int wrlen,
std::vector< uint32_t > & csvec,
uint64_t opts = 0,
int * csfix = 0 )
overridevirtual

Write file pages from a buffer and corresponding verified checksums.

Parameters
buffpointer to buffer holding the bytes to be written.
offsThe offset where the write is to start.
wrlenThe number of bytes to write. offs+wrlen (i.e. it establishes an end of file).
csvecA vector of that holds the corresponding verified CRC32C checksum for each page or page segment.
optsProcessing options.
csfixWhen not nil, returns the number of corrected checksum errs.
Returns
>= 0 The number of bytes written.
-errno File could not be written, returned value is the reason.

Reimplemented from XrdOucCacheIO.

Definition at line 559 of file XrdPosixFile.cc.

565{
566 XrdCl::XRootDStatus Status;
567
568// Preset checksum error count
569//
570 if (csfix) *csfix = 0;
571
572// Issue write and return appropriately. An error returns -1.
573//
574 Ref();
575 Status = clFile.PgWrite((uint64_t)offs, (uint32_t)wlen, buff, csvec);
576 unRef();
577
578 return (Status.IsOK() ? wlen : XrdPosixMap::Result(Status,ecMsg,true));
579}

References clFile, XrdPosixObject::ecMsg, XrdCl::Status::IsOK(), opts, XrdPosixObject::Ref(), XrdPosixMap::Result(), and XrdPosixObject::unRef().

Here is the call graph for this function:

◆ pgWrite() [2/2]

void XrdPosixFile::pgWrite ( XrdOucCacheIOCB & iocb,
char * buff,
long long offs,
int wrlen,
std::vector< uint32_t > & csvec,
uint64_t opts = 0,
int * csfix = 0 )
overridevirtual

Write file pages and checksums using asynchronous I/O (default sync).

Parameters
iocbreference to the callback object that receives the result. All results are returned via this object's Done() method. If the caller holds any locks they must be recursive locks as the callback may occur on the calling thread.
buffpointer to buffer holding the bytes to be written.
offsThe offset where the write is to start.
wrlenThe number of bytes to write.
csvecA vector of that holds the corresponding verified CRC32C checksum for each page or page segment.
optsProcessing options.
csfixWhen not nil, returns the number of corrected checksum errs.

Reimplemented from XrdOucCacheIO.

Definition at line 583 of file XrdPosixFile.cc.

590{
591 XrdCl::XRootDStatus Status;
592 XrdPosixFileRH *rhP;
593
594// Allocate callback object. Note that a pgWrite is essentially a normal write
595// as far as the response handler is concerned.
596//
597 rhP = XrdPosixFileRH::Alloc(&iocb,this,offs,wlen,XrdPosixFileRH::isWrite);
598
599// Set checksum info
600//
601 if (csfix)
602 {*csfix = 0;
603 rhP->setCSVec(0, csfix);
604 }
605
606// Issue write
607//
608 Ref();
609 Status = clFile.PgWrite((uint64_t)offs, (uint32_t)wlen, buff, csvec, rhP);
610
611// Check status, if error pass along -errno as the result.
612//
613 if (!Status.IsOK())
614 {rhP->Sched(XrdPosixMap::Result(Status,ecMsg,false));
615 unRef();
616 }
617}

References XrdPosixFileRH::Alloc(), clFile, XrdPosixObject::ecMsg, XrdCl::Status::IsOK(), XrdPosixFileRH::isWrite, opts, XrdPosixObject::Ref(), XrdPosixMap::Result(), XrdPosixFileRH::Sched(), XrdPosixFileRH::setCSVec(), and XrdPosixObject::unRef().

Here is the call graph for this function:

◆ Read() [1/2]

int XrdPosixFile::Read ( char * buff,
long long offs,
int rlen )
overridevirtual

Perform an synchronous read.

Parameters
buffpointer to the buffer to receive the results. The buffer must remain valid until the callback is invoked.
offsthe offset into the file.
rlenthe number of bytes to read.
Returns
< 0 - Read failed, value is -errno. >=0 - Read succeeded, value is number of bytes read.

Implements XrdOucCacheIO.

Definition at line 623 of file XrdPosixFile.cc.

624{
625 XrdCl::XRootDStatus Status;
626 uint32_t bytes;
627
628// Handle automatic pgread
629//
631 {pgioCB pgrCB("Posix pgRead CB");
632 Read(pgrCB, Buff, Offs, Len);
633 return pgrCB.Wait4PGIO();
634 }
635
636// Issue read and return appropriately.
637//
638 Ref();
639 Status = clFile.Read((uint64_t)Offs, (uint32_t)Len, Buff, bytes);
640 unRef();
641
642 return (Status.IsOK() ? (int)bytes : XrdPosixMap::Result(Status,ecMsg,false));
643}
int Read(char *Buff, long long Offs, int Len) override

References XrdPosixGlobals::autoPGRD, clFile, XrdPosixObject::ecMsg, XrdCl::Status::IsOK(), Read(), XrdPosixObject::Ref(), XrdPosixMap::Result(), and XrdPosixObject::unRef().

Referenced by Read().

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

◆ Read() [2/2]

void XrdPosixFile::Read ( XrdOucCacheIOCB & iocb,
char * buff,
long long offs,
int rlen )
overridevirtual

Perform an asynchronous read (defaults to synchronous).

Parameters
iocbreference to the callback object that receives the result. All results are returned via this object's Done() method. If the caller holds any locks they must be recursive locks as the callback may occur on the calling thread.
buffpointer to the buffer to receive the results. The buffer must remain valid until the callback is invoked.
offsthe offset into the file.
rlenthe number of bytes to read.

Reimplemented from XrdOucCacheIO.

Definition at line 647 of file XrdPosixFile.cc.

649{
650 XrdCl::XRootDStatus Status;
651 XrdPosixFileRH *rhP;
653 bool doPgRd = XrdPosixGlobals::autoPGRD;
654
655// Allocate correct callback object
656//
658 rhP = XrdPosixFileRH::Alloc(&iocb, this, offs, rlen, rhT);
659
660// Issue read
661//
662 Ref();
663 if (doPgRd) Status = clFile.PgRead((uint64_t)offs,(uint32_t)rlen,buff,rhP);
664 else Status = clFile.Read ((uint64_t)offs,(uint32_t)rlen,buff,rhP);
665
666// Check status. Upon error pass along -errno as the result.
667//
668 if (!Status.IsOK())
669 {rhP->Sched(XrdPosixMap::Result(Status, ecMsg, false));
670 unRef();
671 }
672}

References XrdPosixFileRH::Alloc(), XrdPosixGlobals::autoPGRD, clFile, XrdPosixObject::ecMsg, XrdCl::Status::IsOK(), XrdPosixFileRH::isRead, XrdPosixFileRH::isReadP, XrdPosixObject::Ref(), XrdPosixMap::Result(), XrdPosixFileRH::Sched(), and XrdPosixObject::unRef().

Here is the call graph for this function:

◆ ReadV() [1/2]

int XrdPosixFile::ReadV ( const XrdOucIOVec * readV,
int rnum )
overridevirtual

Perform an synchronous vector read.

Parameters
readVpointer to a vector of read requests.
rnumthe number of elements in the vector.
Returns
< 0 - ReadV failed, value is -errno. >=0 - ReadV succeeded, value is number of bytes read.

Reimplemented from XrdOucCacheIO.

Definition at line 678 of file XrdPosixFile.cc.

679{
680 XrdCl::XRootDStatus Status;
681 XrdCl::ChunkList chunkVec;
682 XrdCl::VectorReadInfo *vrInfo = 0;
683 int nbytes = 0;
684
685// Copy in the vector (would be nice if we didn't need to do this)
686//
687 chunkVec.reserve(n);
688 for (int i = 0; i < n; i++)
689 {nbytes += readV[i].size;
690 chunkVec.push_back(XrdCl::ChunkInfo((uint64_t)readV[i].offset,
691 (uint32_t)readV[i].size,
692 (void *)readV[i].data
693 ));
694 }
695
696// Issue the readv. We immediately delete the vrInfo as w don't need it as a
697// readv will succeed only if actually read the number of bytes requested.
698//
699 Ref();
700 Status = clFile.VectorRead(chunkVec, (void *)0, vrInfo);
701 unRef();
702 delete vrInfo;
703
704// Return appropriate result (here we return -errno as the result)
705//
706 return (Status.IsOK() ? nbytes : XrdPosixMap::Result(Status, ecMsg, false));
707}
std::vector< ChunkInfo > ChunkList
List of chunks.

References clFile, XrdPosixObject::ecMsg, XrdCl::Status::IsOK(), XrdPosixObject::Ref(), XrdPosixMap::Result(), XrdOucIOVec::size, and XrdPosixObject::unRef().

Here is the call graph for this function:

◆ ReadV() [2/2]

void XrdPosixFile::ReadV ( XrdOucCacheIOCB & iocb,
const XrdOucIOVec * readV,
int rnum )
overridevirtual

Perform an asynchronous vector read (defaults to synchronous).

Parameters
iocbreference to the callback object that receives the result. All results are returned via this object's Done() method. If the caller holds any locks they must be recursive locks as the callback may occur on the calling thread.
readVpointer to a vector of read requests.
rnumthe number of elements in the vector.

Reimplemented from XrdOucCacheIO.

Definition at line 711 of file XrdPosixFile.cc.

712{
713 XrdCl::XRootDStatus Status;
714 XrdCl::ChunkList chunkVec;
715 int nbytes = 0;
716
717// Copy in the vector (would be nice if we didn't need to do this)
718//
719 chunkVec.reserve(n);
720 for (int i = 0; i < n; i++)
721 {nbytes += readV[i].size;
722 chunkVec.push_back(XrdCl::ChunkInfo((uint64_t)readV[i].offset,
723 (uint32_t)readV[i].size,
724 (void *)readV[i].data
725 ));
726 }
727
728// Issue the readv.
729//
730 XrdPosixFileRH *rhp = XrdPosixFileRH::Alloc(&iocb, this, 0, nbytes,
732 Ref();
733 Status = clFile.VectorRead(chunkVec, (void *)0, rhp);
734
735// Return appropriate result
736//
737 if (!Status.IsOK())
738 {rhp->Sched(XrdPosixMap::Result(Status, ecMsg, false));
739 unRef();
740 }
741}

References XrdPosixFileRH::Alloc(), clFile, XrdPosixObject::ecMsg, XrdCl::Status::IsOK(), XrdPosixFileRH::isReadV, XrdPosixObject::Ref(), XrdPosixMap::Result(), XrdPosixFileRH::Sched(), XrdOucIOVec::size, and XrdPosixObject::unRef().

Here is the call graph for this function:

◆ setOffset()

long long XrdPosixFile::setOffset ( long long offs)
inline

Definition at line 149 of file XrdPosixFile.hh.

150 {updMutex.Lock();
151 currOffset = offs;
152 updMutex.UnLock();
153 return offs;
154 }

References XrdPosixObject::updMutex.

Referenced by XrdPosixXrootd::Lseek().

Here is the caller graph for this function:

◆ Stat()

bool XrdPosixFile::Stat ( XrdCl::XRootDStatus & Status,
bool force = false )

Definition at line 747 of file XrdPosixFile.cc.

748{
749 XrdCl::StatInfo *sInfo = 0;
750
751// Get the stat information from the open file
752//
753 Ref();
754 Status = clFile.Stat(force, sInfo);
755 if (!Status.IsOK())
756 {unRef();
757 delete sInfo;
758 return false;
759 }
760
761// Copy over the relevant fields, the stat structure must have been
762// properly pre-initialized.
763//
765 myMtime = static_cast<time_t>(sInfo->GetModTime());
766 mySize = static_cast<size_t>(sInfo->GetSize());
767 myInode = static_cast<ino_t>(strtoll(sInfo->GetId().c_str(), 0, 10));
768
769// If this is an extended stat then we can get some more info
770//
771 if (sInfo->ExtendedFormat())
772 {myCtime = static_cast<time_t>(sInfo->GetChangeTime());
773 myAtime = static_cast<time_t>(sInfo->GetAccessTime());
774 } else {
776 myAtime = time(0);
777 }
778
779// Delete our status information and return final result
780//
781 unRef();
782 delete sInfo;
783 return true;
784}
uint64_t GetChangeTime() const
Get change time (in seconds since epoch).
uint64_t GetSize() const
Get size (in bytes).
uint32_t GetFlags() const
Get flags.
bool ExtendedFormat() const
Has extended stat information.
const std::string & GetId() const
Get id.
uint64_t GetModTime() const
Get modification time (in seconds since epoch).
uint64_t GetAccessTime() const
Get change time (in seconds since epoch).
static mode_t Flags2Mode(dev_t *rdv, uint32_t flags)

References clFile, XrdCl::StatInfo::ExtendedFormat(), XrdPosixMap::Flags2Mode(), XrdCl::StatInfo::GetAccessTime(), XrdCl::StatInfo::GetChangeTime(), XrdCl::StatInfo::GetFlags(), XrdCl::StatInfo::GetId(), XrdCl::StatInfo::GetModTime(), XrdCl::StatInfo::GetSize(), XrdCl::Status::IsOK(), myAtime, myCtime, myInode, myMode, myMtime, myRdev, mySize, XrdPosixObject::Ref(), and XrdPosixObject::unRef().

Here is the call graph for this function:

◆ Sync() [1/2]

int XrdPosixFile::Sync ( )
overridevirtual

Perform an synchronous sync() operation.

Returns
<0 - Sync failed, value is -errno. =0 - Sync succeeded.

Implements XrdOucCacheIO.

Definition at line 790 of file XrdPosixFile.cc.

791{
792 XrdCl::XRootDStatus Status;
793
794// Issue the Sync
795//
796 Ref();
797 Status = clFile.Sync();
798 unRef();
799
800// Return result
801//
802 return XrdPosixMap::Result(Status, ecMsg, false);
803}

References clFile, XrdPosixObject::ecMsg, XrdPosixObject::Ref(), XrdPosixMap::Result(), and XrdPosixObject::unRef().

Here is the call graph for this function:

◆ Sync() [2/2]

void XrdPosixFile::Sync ( XrdOucCacheIOCB & iocb)
overridevirtual

Perform an asynchronous sync() operation (defaults to synchronous).

Parameters
iocbreference to the callback object that receives the result. All results are returned via this object's Done() method. If the caller holds any locks they must be recursive locks as the callback may occur on the calling thread.

Reimplemented from XrdOucCacheIO.

Definition at line 807 of file XrdPosixFile.cc.

808{
809 XrdCl::XRootDStatus Status;
810 XrdPosixFileRH *rhp = XrdPosixFileRH::Alloc(&iocb, this, 0, 0,
812
813// Issue read
814//
815 Status = clFile.Sync(rhp);
816
817// Check status
818//
819 if (!Status.IsOK()) rhp->Sched(XrdPosixMap::Result(Status, ecMsg, false));
820}

References XrdPosixFileRH::Alloc(), clFile, XrdPosixObject::ecMsg, XrdCl::Status::IsOK(), XrdPosixFileRH::nonIO, XrdPosixMap::Result(), and XrdPosixFileRH::Sched().

Here is the call graph for this function:

◆ Trunc()

int XrdPosixFile::Trunc ( long long offs)
overridevirtual

Perform an synchronous trunc() operation.

Parameters
offsthe size the file is have.
Returns
<0 - Trunc failed, value is -errno. =0 - Trunc succeeded.

Implements XrdOucCacheIO.

Definition at line 826 of file XrdPosixFile.cc.

827{
828 XrdCl::XRootDStatus Status;
829
830// Issue truncate request
831//
832 Ref();
833 Status = clFile.Truncate((uint64_t)Offset);
834 unRef();
835
836// Return results
837//
838 return XrdPosixMap::Result(Status,ecMsg,false);
839}
long long Offset()

References clFile, XrdPosixObject::ecMsg, Offset(), XrdPosixObject::Ref(), XrdPosixMap::Result(), and XrdPosixObject::unRef().

Here is the call graph for this function:

◆ updLock()

void XrdPosixFile::updLock ( )
inline

Definition at line 111 of file XrdPosixFile.hh.

111{updMutex.Lock();}

References XrdPosixObject::updMutex.

◆ UpdtSize()

void XrdPosixFile::UpdtSize ( size_t newsz)
inline

Definition at line 164 of file XrdPosixFile.hh.

165 {updMutex.Lock();
166 if (newsz > mySize) mySize = newsz;
167 updMutex.UnLock();
168 }

References mySize, and XrdPosixObject::updMutex.

Referenced by XrdPosixExtra::pgWrite(), and XrdPosixXrootd::Pwrite().

Here is the caller graph for this function:

◆ updUnLock()

void XrdPosixFile::updUnLock ( )
inline

Definition at line 113 of file XrdPosixFile.hh.

113{updMutex.UnLock();}

References XrdPosixObject::updMutex.

◆ Who() [1/2]

virtual bool XrdPosixObject::Who ( XrdPosixDir ** dirP)
inlinevirtual

Reimplemented from XrdPosixObject.

Definition at line 89 of file XrdPosixObject.hh.

89{return false;}

◆ Who() [2/2]

bool XrdPosixFile::Who ( XrdPosixFile ** fileP)
inlineoverridevirtual

Reimplemented from XrdPosixObject.

Definition at line 172 of file XrdPosixFile.hh.

173 {*fileP = this; return true;}

References XrdPosixFile().

Here is the call graph for this function:

◆ Write() [1/2]

int XrdPosixFile::Write ( char * buff,
long long offs,
int wlen )
overridevirtual

Perform an synchronous write.

Parameters
buffpointer to the buffer holding the contents. The buffer must remain valid until the callback is invoked.
offsthe offset into the file.
wlenthe number of bytes to write
Returns
< 0 - Write failed, value is -errno. >=0 - Write succeeded, value is number of bytes written.

Implements XrdOucCacheIO.

Definition at line 845 of file XrdPosixFile.cc.

846{
847 XrdCl::XRootDStatus Status;
848
849// Issue write and return appropriately
850//
851 Ref();
852 Status = clFile.Write((uint64_t)Offs, (uint32_t)Len, Buff);
853 unRef();
854
855 return (Status.IsOK() ? Len : XrdPosixMap::Result(Status,ecMsg,false));
856}

References clFile, XrdPosixObject::ecMsg, XrdCl::Status::IsOK(), XrdPosixObject::Ref(), XrdPosixMap::Result(), and XrdPosixObject::unRef().

Here is the call graph for this function:

◆ Write() [2/2]

void XrdPosixFile::Write ( XrdOucCacheIOCB & iocb,
char * buff,
long long offs,
int wlen )
overridevirtual

Perform an asynchronous write (defaults to synchronous).

Parameters
iocbreference to the callback object that receives the result. All results are returned via this object's Done() method. If the caller holds any locks they must be recursive locks as the callback may occur on the calling thread.
buffpointer to the buffer holding the contents. The buffer must remain valid until the callback is invoked.
offsthe offset into the file.
wlenthe number of bytes to write

Reimplemented from XrdOucCacheIO.

Definition at line 860 of file XrdPosixFile.cc.

862{
863 XrdCl::XRootDStatus Status;
864 XrdPosixFileRH *rhp = XrdPosixFileRH::Alloc(&iocb, this, offs, wlen,
866
867// Issue write
868//
869 Ref();
870 Status = clFile.Write((uint64_t)offs, (uint32_t)wlen, buff, rhp);
871
872// Check status
873//
874 if (!Status.IsOK())
875 {rhp->Sched(XrdPosixMap::Result(Status,ecMsg,false));
876 unRef();
877 }
878}

References XrdPosixFileRH::Alloc(), clFile, XrdPosixObject::ecMsg, XrdCl::Status::IsOK(), XrdPosixFileRH::isWrite, XrdPosixObject::Ref(), XrdPosixMap::Result(), XrdPosixFileRH::Sched(), and XrdPosixObject::unRef().

Here is the call graph for this function:

Member Data Documentation

◆ clFile

◆ ddList

XrdPosixFile * XrdPosixFile::ddList = InitDDL()
static

Definition at line 191 of file XrdPosixFile.hh.

Referenced by DelayedDestroy(), and DelayedDestroy().

◆ ddLost

XrdPosixFile * XrdPosixFile::ddLost = 0
static

Definition at line 192 of file XrdPosixFile.hh.

Referenced by DelayedDestroy().

◆ ddMutex

XrdSysMutex XrdPosixFile::ddMutex
static

Definition at line 190 of file XrdPosixFile.hh.

Referenced by DelayedDestroy(), and DelayedDestroy().

◆ ddNum

int XrdPosixFile::ddNum = 0
static

Definition at line 196 of file XrdPosixFile.hh.

Referenced by DelayedDestroy(), and DelayedDestroy().

◆ ddPosted

bool XrdPosixFile::ddPosted = false
static

Definition at line 195 of file XrdPosixFile.hh.

Referenced by DelayedDestroy(), and DelayedDestroy().

◆ ddSem

XrdSysSemaphore XrdPosixFile::ddSem
static

Definition at line 189 of file XrdPosixFile.hh.

Referenced by DelayedDestroy(), and DelayedDestroy().

◆ isStrm

const int XrdPosixFile::isStrm = 2
static

Definition at line 199 of file XrdPosixFile.hh.

Referenced by XrdPosixFile().

◆ isUpdt

const int XrdPosixFile::isUpdt = 4
static

Definition at line 200 of file XrdPosixFile.hh.

Referenced by XrdPosixFile().

◆ myAtime

time_t XrdPosixFile::myAtime

Definition at line 181 of file XrdPosixFile.hh.

Referenced by XrdPosixFile(), Fstat(), and Stat().

◆ myCtime

time_t XrdPosixFile::myCtime

Definition at line 182 of file XrdPosixFile.hh.

Referenced by XrdPosixFile(), Fstat(), and Stat().

◆ myInode

ino_t XrdPosixFile::myInode

Definition at line 185 of file XrdPosixFile.hh.

Referenced by XrdPosixFile(), Fstat(), and Stat().

◆ myMode

mode_t XrdPosixFile::myMode

Definition at line 186 of file XrdPosixFile.hh.

Referenced by XrdPosixFile(), Fstat(), and Stat().

◆ myMtime

time_t XrdPosixFile::myMtime

Definition at line 183 of file XrdPosixFile.hh.

Referenced by XrdPosixFile(), Fstat(), and Stat().

◆ myRdev

dev_t XrdPosixFile::myRdev

Definition at line 184 of file XrdPosixFile.hh.

Referenced by XrdPosixFile(), Fstat(), and Stat().

◆ mySize

size_t XrdPosixFile::mySize

Definition at line 180 of file XrdPosixFile.hh.

Referenced by XrdPosixFile(), addOffset(), FSize(), Stat(), and UpdtSize().

◆ PrepIO

XrdPosixPrepIO* XrdPosixFile::PrepIO

Definition at line 66 of file XrdPosixFile.hh.

Referenced by XrdPosixFile(), ~XrdPosixFile(), Close(), and Finalize().

◆ realFD

const int XrdPosixFile::realFD = 1
static

Definition at line 198 of file XrdPosixFile.hh.

◆ sfSFX

char * XrdPosixFile::sfSFX = 0
static

Definition at line 193 of file XrdPosixFile.hh.

Referenced by XrdPosixFile().

◆ sfSLN

short XrdPosixFile::sfSLN = 0
static

Definition at line 194 of file XrdPosixFile.hh.

Referenced by XrdPosixFile().

◆ XCio


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