XrdOssFile Class Reference
#include <XrdOssApi.hh>
List of all members.
Public Member Functions |
virtual int | Close (long long *retsz=0) |
virtual int | Open (const char *, int, mode_t, XrdOucEnv &) |
int | Fchmod (mode_t mode) |
void | Flush () |
| Flush filesystem cached pages for this file (used for checksums).
|
int | Fstat (struct stat *) |
int | Fsync () |
int | Fsync (XrdSfsAio *aiop) |
int | Ftruncate (unsigned long long) |
int | getFD () |
off_t | getMmap (void **addr) |
int | isCompressed (char *cxidp=0) |
ssize_t | Read (off_t, size_t) |
ssize_t | Read (void *, off_t, size_t) |
int | Read (XrdSfsAio *aiop) |
ssize_t | ReadV (XrdOucIOVec *readV, int) |
ssize_t | ReadRaw (void *, off_t, size_t) |
ssize_t | Write (const void *, off_t, size_t) |
int | Write (XrdSfsAio *aiop) |
| XrdOssFile (const char *tid, int fdnum=-1) |
virtual | ~XrdOssFile () |
Private Member Functions |
int | Open_ufs (const char *, int, int, unsigned long long) |
Private Attributes |
oocx_CXFile * | cxobj |
XrdOssCache_FS * | cacheP |
XrdOssMioFile * | mmFile |
long long | FSize |
int | rawio |
int | cxpgsz |
char | cxid [4] |
Static Private Attributes |
static int | AioFailure |
Constructor & Destructor Documentation
XrdOssFile::XrdOssFile |
( |
const char * |
tid, |
|
|
int |
fdnum = -1 | |
|
) |
| | [inline] |
virtual XrdOssFile::~XrdOssFile |
( |
|
) |
[inline, virtual] |
Member Function Documentation
virtual int XrdOssFile::Close |
( |
long long * |
retsz = 0 |
) |
[virtual] |
Close a directory or file.
- Parameters:
-
| retsz | If not nil, where the size of the file is to be returned. |
- Returns:
- 0 upon success or -errno or -osserr (see XrdOssError.hh).
Implements XrdOssDF.
Referenced by ~XrdOssFile().
int XrdOssFile::Fchmod |
( |
mode_t |
mode |
) |
[virtual] |
Change file mode settings.
- Parameters:
-
| mode | - The new file mode setting. |
- Returns:
- 0 upon success or -errno or -osserr (see XrdOssError.hh).
Reimplemented from XrdOssDF.
void XrdOssFile::Flush |
( |
|
) |
[virtual] |
Flush filesystem cached pages for this file (used for checksums).
Reimplemented from XrdOssDF.
int XrdOssFile::Fstat |
( |
struct stat * |
buf |
) |
[virtual] |
Return state information for this file.
- Parameters:
-
| buf | - Pointer to the structure where info it to be returned. |
- Returns:
- 0 upon success or -errno or -osserr (see XrdOssError.hh).
Reimplemented from XrdOssDF.
int XrdOssFile::Fsync |
( |
XrdSfsAio * |
aiop |
) |
[virtual] |
Synchronize associated file with media (asynchronous).
- Parameters:
-
| aiop | - Pointer to async I/O request object. |
- Returns:
- 0 upon success or -errno or -osserr (see XrdOssError.hh).
Reimplemented from XrdOssDF.
int XrdOssFile::Fsync |
( |
void |
|
) |
[virtual] |
Synchronize associated file with media (synchronous).
- Returns:
- 0 upon success or -errno or -osserr (see XrdOssError.hh).
Reimplemented from XrdOssDF.
int XrdOssFile::Ftruncate |
( |
unsigned long long |
|
) |
[virtual] |
Set the size of the associated file.
- Parameters:
-
| flen | - The new size of the file. |
- Returns:
- 0 upon success or -errno or -osserr (see XrdOssError.hh).
Reimplemented from XrdOssDF.
int XrdOssFile::getFD |
( |
|
) |
[inline, virtual] |
Return the underlying file descriptor.
- Returns:
- -1 if there is no file descriptor or a non-negative FD number.
Reimplemented from XrdOssDF.
References XrdOssDF::fd.
off_t XrdOssFile::getMmap |
( |
void ** |
addr |
) |
[virtual] |
Return the memory mapped characteristics of the file.
- Parameters:
-
| addr | - Pointer to where the memory mapped address is to be returned. |
- Returns:
- If mapped, the size of the file is returned and it memory location is placed in addr. Otherwise, addr is set to zero and zero is returned. Note that zero length files cannot be memory mapped.
Reimplemented from XrdOssDF.
int XrdOssFile::isCompressed |
( |
char * |
cxidp = 0 |
) |
[virtual] |
Return file compression charectistics.
- Parameters:
-
| cxidp | - Pointer to where the compression algorithm name returned. |
- Returns:
- If the file is compressed, the region size if returned. Otherwise, zero is returned (file not compressed).
Reimplemented from XrdOssDF.
virtual int XrdOssFile::Open |
( |
const char * |
path, |
|
|
int |
Oflag, |
|
|
mode_t |
Mode, |
|
|
XrdOucEnv & |
env | |
|
) |
| | [virtual] |
Open a file.
- Parameters:
-
| path | - Pointer to the path of the file to be opened. |
| Oflag | - Standard open flags. |
| Mode | - File open mode (ignored unless creating a file). |
| env | - Reference to environmental information. |
- Returns:
- 0 upon success or -errno or -osserr (see XrdOssError.hh).
Reimplemented from XrdOssDF.
int XrdOssFile::Open_ufs |
( |
const char * |
, |
|
|
int |
, |
|
|
int |
, |
|
|
unsigned long |
long | |
|
) |
| | [private] |
int XrdOssFile::Read |
( |
XrdSfsAio * |
aoip |
) |
[virtual] |
Read file bytes using asynchronous I/O.
- Parameters:
-
| aiop | - Pointer to async I/O object controlling the I/O. |
- Returns:
- 0 upon if request started success or -errno or -osserr (see XrdOssError.hh).
Reimplemented from XrdOssDF.
ssize_t XrdOssFile::Read |
( |
void * |
buffer, |
|
|
off_t |
offset, |
|
|
size_t |
size | |
|
) |
| | [virtual] |
Read file bytes into a buffer.
- Parameters:
-
| buffer | - pointer to buffer where the bytes are to be placed. |
| offset | - The offset where the read is to start. |
| size | - The number of bytes to read. |
- Returns:
- >= 0 The number of bytes that placed in buffer.
-
< 0 -errno or -osserr upon failure (see XrdOssError.hh).
Reimplemented from XrdOssDF.
ssize_t XrdOssFile::Read |
( |
off_t |
offset, |
|
|
size_t |
size | |
|
) |
| | [virtual] |
Preread file blocks into the file system cache.
- Parameters:
-
| offset | - The offset where the read is to start. |
| size | - The number of bytes to pre-read. |
- Returns:
- 0 upon success or -errno or -osserr (see XrdOssError.hh).
Reimplemented from XrdOssDF.
ssize_t XrdOssFile::ReadRaw |
( |
void * |
buffer, |
|
|
off_t |
offset, |
|
|
size_t |
size | |
|
) |
| | [virtual] |
Read uncompressed file bytes into a buffer.
- Parameters:
-
| buffer | - pointer to buffer where the bytes are to be placed. |
| offset | - The offset where the read is to start. |
| size | - The number of bytes to read. |
- Returns:
- >= 0 The number of bytes that placed in buffer.
-
< 0 -errno or -osserr upon failure (see XrdOssError.hh).
Reimplemented from XrdOssDF.
ssize_t XrdOssFile::ReadV |
( |
XrdOucIOVec * |
readV, |
|
|
int |
rdvcnt | |
|
) |
| | [virtual] |
Read file bytes as directed by the read vector.
- Parameters:
-
| readV | pointer to the array of read requests. |
| rdvcnt | the number of elements in readV. |
- Returns:
- >=0 The numbe of bytes read.
-
< 0 -errno or -osserr upon failure (see XrdOssError.hh).
Reimplemented from XrdOssDF.
int XrdOssFile::Write |
( |
XrdSfsAio * |
aiop |
) |
[virtual] |
Write file bytes using asynchronous I/O.
- Parameters:
-
| aiop | - Pointer to async I/O object controlling the I/O. |
- Returns:
- 0 upon if request started success or -errno or -osserr (see XrdOssError.hh).
Reimplemented from XrdOssDF.
ssize_t XrdOssFile::Write |
( |
const void * |
buffer, |
|
|
off_t |
offset, |
|
|
size_t |
size | |
|
) |
| | [virtual] |
Write file bytes from a buffer.
- Parameters:
-
| buffer | - pointer to buffer where the bytes reside. |
| offset | - The offset where the write is to start. |
| size | - The number of bytes to write. |
- Returns:
- >= 0 The number of bytes that were written.
-
< 0 -errno or -osserr upon failure (see XrdOssError.hh).
Reimplemented from XrdOssDF.
Member Data Documentation
The documentation for this class was generated from the following file: