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> 70 static int Access(
const char *path,
int amode);
76 static int Close(
int fildes);
95 static int endPoint(
int FD,
char *Buff,
int Blen);
101 static int Fstat(
int fildes,
struct stat *buf);
107 static int Fsync(
int fildes);
115 static int Ftruncate(
int fildes, off_t offset);
136 static long long Getxattr (
const char *path,
const char *name,
137 void *value,
unsigned long long size);
143 static off_t
Lseek(
int fildes, off_t offset,
int whence);
149 static int Mkdir(
const char *path, mode_t mode);
165 static int Open(
const char *path,
int oflag, mode_t mode=0,
172 static DIR*
Opendir(
const char *path);
178 static ssize_t
Pread(
int fildes,
void *buf,
size_t nbyte, off_t offset);
180 static void Pread(
int fildes,
void *buf,
size_t nbyte, off_t offset,
187 static ssize_t
Pwrite(
int fildes,
const void *buf,
size_t nbyte, off_t offset);
189 static void Pwrite(
int fildes,
const void *buf,
size_t nbyte, off_t offset,
205 static int QueryChksum(
const char *path, time_t &mtime,
206 char *buff,
int blen);
220 static long long QueryOpaque(
const char *path,
char *buff,
int blen);
226 static ssize_t
Read(
int fildes,
void *buf,
size_t nbyte);
232 static ssize_t
Readv(
int fildes,
const struct iovec *
iov,
int iovcnt);
240 static struct dirent*
Readdir (DIR *dirp);
241 static struct dirent64*
Readdir64(DIR *dirp);
249 static int Readdir_r (DIR *dirp,
struct dirent *entry,
struct dirent **result);
250 static int Readdir64_r(DIR *dirp,
struct dirent64 *entry,
struct dirent64 **result);
256 static int Rename(
const char *oldpath,
const char *newpath);
268 static int Rmdir(
const char *path);
274 static void Seekdir(DIR *dirp,
long loc);
280 static int Stat(
const char *path,
struct stat *buf);
287 static int Statfs(
const char *path,
struct statfs *buf);
299 static long Telldir(DIR *dirp);
305 static int Truncate(
const char *path, off_t offset);
311 static int Unlink(
const char *path);
337 static ssize_t
Write(
int fildes,
const void *buf,
size_t nbyte);
343 static ssize_t
Writev(
int fildes,
const struct iovec *
iov,
int iovcnt);
354 static bool myFD(
int fd);
374 static int Open(
const char *path,
int oflag, mode_t mode,
static int baseFD
Definition: XrdPosixXrootd.hh:378
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:163
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:350
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:379
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)