1 #ifndef __XRDPOSIXXROOTD_H__
2 #define __XRDPOSIXXROOTD_H__
37 #include <sys/statvfs.h>
38 #include <sys/types.h>
40 #if defined(__APPLE__) || defined(__FreeBSD__)
41 #include <sys/param.h>
42 #include <sys/mount.h>
44 #include <sys/statfs.h>
71 static int Access(
const char *path,
int amode);
77 static int Close(
int fildes);
96 static int endPoint(
int FD,
char *Buff,
int Blen);
102 static int Fstat(
int fildes,
struct stat *buf);
108 static int Fsync(
int fildes);
116 static int Ftruncate(
int fildes, off_t offset);
137 static long long Getxattr (
const char *path,
const char *name,
138 void *value,
unsigned long long size);
144 static off_t
Lseek(
int fildes, off_t offset,
int whence);
150 static int Mkdir(
const char *path, mode_t mode);
166 static int Open(
const char *path,
int oflag, mode_t mode=0,
173 static DIR*
Opendir(
const char *path);
179 static ssize_t
Pread(
int fildes,
void *buf,
size_t nbyte, off_t offset);
181 static void Pread(
int fildes,
void *buf,
size_t nbyte, off_t offset,
188 static ssize_t
Pwrite(
int fildes,
const void *buf,
size_t nbyte, off_t offset);
190 static void Pwrite(
int fildes,
const void *buf,
size_t nbyte, off_t offset,
206 static int QueryChksum(
const char *path, time_t &mtime,
207 char *buff,
int blen);
221 static long long QueryOpaque(
const char *path,
char *buff,
int blen);
227 static ssize_t
Read(
int fildes,
void *buf,
size_t nbyte);
233 static ssize_t
Readv(
int fildes,
const struct iovec *
iov,
int iovcnt);
241 static struct dirent*
Readdir (DIR *dirp);
242 static struct dirent64*
Readdir64(DIR *dirp);
250 static int Readdir_r (DIR *dirp,
struct dirent *entry,
struct dirent **result);
251 static int Readdir64_r(DIR *dirp,
struct dirent64 *entry,
struct dirent64 **result);
257 static int Rename(
const char *oldpath,
const char *newpath);
269 static int Rmdir(
const char *path);
275 static void Seekdir(DIR *dirp,
long loc);
281 static int Stat(
const char *path,
struct stat *buf);
288 static int Statfs(
const char *path,
struct statfs *buf);
300 static long Telldir(DIR *dirp);
306 static int Truncate(
const char *path, off_t offset);
312 static int Unlink(
const char *path);
338 static ssize_t
Write(
int fildes,
const void *buf,
size_t nbyte);
344 static ssize_t
Writev(
int fildes,
const struct iovec *
iov,
int iovcnt);
355 static bool myFD(
int fd);
375 static int Open(
const char *path,
int oflag, mode_t mode,
static int baseFD
Definition: XrdPosixXrootd.hh:379
static int Statvfs(const char *path, struct statvfs *buf)
Statvfs() conforms to POSIX.1-2001 statvfs()
static int Ftruncate(int fildes, off_t offset)
Ftruncate() conforms to POSIX.1-2001 ftruncate()
static ssize_t Readv(int fildes, const struct iovec *iov, int iovcnt)
Readv() conforms to POSIX.1-2001 readv()
static int Open(const char *path, int oflag, mode_t mode=0, XrdPosixCallBack *cbP=0)
static const int isStream
Definition: XrdPosixXrootd.hh:164
static long Telldir(DIR *dirp)
Telldir() conforms to POSIX.1-2001 telldir()
static long long Getxattr(const char *path, const char *name, void *value, unsigned long long size)
Definition: XrdPosixFile.hh:57
#define statfs(a, b)
Definition: XrdPosix.hh:98
int fdOrigin()
Definition: XrdPosixXrootd.hh:351
static long long QueryOpaque(const char *path, char *buff, int blen)
static ssize_t Pread(int fildes, void *buf, size_t nbyte, off_t offset)
Pread() conforms to POSIX.1-2001 pread()
static ssize_t Write(int fildes, const void *buf, size_t nbyte)
Write() conforms to POSIX.1-2001 write()
static int Unlink(const char *path)
Unlink() conforms to POSIX.1-2001 unlink()
static int Access(const char *path, int amode)
Access() conforms to POSIX.1-2001 access()
XrdPosixXrootd(int maxfd=255, int maxdir=0, int maxthr=0)
static int Stat(const char *path, struct stat *buf)
Stat() conforms to POSIX.1-2001 stat()
static int Fsync(int fildes)
Fsync() conforms to POSIX.1-2001 fsync()
static bool OpenCache(XrdPosixFile &file, XrdPosixInfo &Info)
Definition: XrdOucIOVec.hh:65
static int Truncate(const char *path, off_t offset)
Telldir() conforms to POSIX.1-2001 telldir()
static ssize_t Pwrite(int fildes, const void *buf, size_t nbyte, off_t offset)
Pwrite() conforms to POSIX.1-2001 pwrite()
An abstract class to define a callback for Open() call.
Definition: XrdPosixCallBack.hh:51
Definition: XrdOucIOVec.hh:40
static int Close(int fildes)
Close() conforms to POSIX.1-2001 close()
static int Fault(XrdPosixFile *fp, int ecode)
static int QueryChksum(const char *path, time_t &mtime, char *buff, int blen)
POSIX interface to XRootD with some extensions, as noted.
Definition: XrdPosixXrootd.hh:61
static int initDone
Definition: XrdPosixXrootd.hh:380
static bool isXrootdDir(DIR *dirp)
static struct dirent * Readdir(DIR *dirp)
static int Statfs(const char *path, struct statfs *buf)
static void VRead(int fildes, const XrdOucIOVec *readV, int n, XrdPosixCallBackIO *cbp)
Definition: XrdPosixConfig.hh:46
static int Fstat(int fildes, struct stat *buf)
Fstat() conforms to POSIX.1-2001 fstat()
#define stat(a, b)
Definition: XrdPosix.hh:96
static int Readdir64_r(DIR *dirp, struct dirent64 *entry, struct dirent64 **result)
static int Closedir(DIR *dirp)
Closedir() conforms to POSIX.1-2001 closedir()
static int endPoint(int FD, char *Buff, int Blen)
static void Rewinddir(DIR *dirp)
Rewinddir() conforms to POSIX.1-2001 rewinddir()
static struct dirent64 * Readdir64(DIR *dirp)
static int Rename(const char *oldpath, const char *newpath)
Rename() conforms to POSIX.1-2001 rename()
Definition: XrdPosixInfo.hh:39
Definition: XrdMacaroonsHandler.hh:18
static int Rmdir(const char *path)
Rmdir() conforms to POSIX.1-2001 rmdir()
Definition: XrdPosixCallBack.hh:75
#define statvfs(a, b)
Definition: XrdPosix.hh:100
static ssize_t Read(int fildes, void *buf, size_t nbyte)
Read() conforms to POSIX.1-2001 read()
static off_t Lseek(int fildes, off_t offset, int whence)
Lseek() conforms to POSIX.1-2001 lseek()
static ssize_t Writev(int fildes, const struct iovec *iov, int iovcnt)
Writev() conforms to POSIX.1-2001 writev()
static void Seekdir(DIR *dirp, long loc)
Seekdir() conforms to POSIX.1-2001 seekdir()
static int Mkdir(const char *path, mode_t mode)
Mkdir() conforms to POSIX.1-2001 mkdir()
static DIR * Opendir(const char *path)
Opendir() conforms to POSIX.1-2001 opendir()
static int Readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result)