00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _XRD_CEPH_POSIX_H
00030 #define _XRD_CEPH_POSIX_H
00031
00032 #include <sys/types.h>
00033 #include <stdarg.h>
00034 #include <dirent.h>
00035 #include <XrdOuc/XrdOucEnv.hh>
00036 #include <XrdSys/XrdSysXAttr.hh>
00037
00038 class XrdSfsAio;
00039 typedef void(AioCB)(XrdSfsAio*, size_t);
00040
00041 void ceph_posix_set_defaults(const char* value);
00042 void ceph_posix_disconnect_all();
00043 void ceph_posix_set_logfunc(void (*logfunc) (char *, va_list argp));
00044 int ceph_posix_open(XrdOucEnv* env, const char *pathname, int flags, mode_t mode);
00045 int ceph_posix_close(int fd);
00046 off_t ceph_posix_lseek(int fd, off_t offset, int whence);
00047 off64_t ceph_posix_lseek64(int fd, off64_t offset, int whence);
00048 ssize_t ceph_posix_write(int fd, const void *buf, size_t count);
00049 ssize_t ceph_posix_pwrite(int fd, const void *buf, size_t count, off64_t offset);
00050 ssize_t ceph_aio_write(int fd, XrdSfsAio *aiop, AioCB *cb);
00051 ssize_t ceph_posix_read(int fd, void *buf, size_t count);
00052 ssize_t ceph_posix_pread(int fd, void *buf, size_t count, off64_t offset);
00053 ssize_t ceph_aio_read(int fd, XrdSfsAio *aiop, AioCB *cb);
00054 int ceph_posix_fstat(int fd, struct stat *buf);
00055 int ceph_posix_stat(XrdOucEnv* env, const char *pathname, struct stat *buf);
00056 int ceph_posix_fsync(int fd);
00057 int ceph_posix_fcntl(int fd, int cmd, ... );
00058 ssize_t ceph_posix_getxattr(XrdOucEnv* env, const char* path, const char* name,
00059 void* value, size_t size);
00060 ssize_t ceph_posix_fgetxattr(int fd, const char* name, void* value, size_t size);
00061 ssize_t ceph_posix_setxattr(XrdOucEnv* env, const char* path, const char* name,
00062 const void* value, size_t size, int flags);
00063 int ceph_posix_fsetxattr(int fd, const char* name, const void* value, size_t size, int flags);
00064 int ceph_posix_removexattr(XrdOucEnv* env, const char* path, const char* name);
00065 int ceph_posix_fremovexattr(int fd, const char* name);
00066 int ceph_posix_listxattrs(XrdOucEnv* env, const char* path, XrdSysXAttr::AList **aPL, int getSz);
00067 int ceph_posix_flistxattrs(int fd, XrdSysXAttr::AList **aPL, int getSz);
00068 void ceph_posix_freexattrlist(XrdSysXAttr::AList *aPL);
00069 int ceph_posix_statfs(long long *totalSpace, long long *freeSpace);
00070 int ceph_posix_truncate(XrdOucEnv* env, const char *pathname, unsigned long long size);
00071 int ceph_posix_ftruncate(int fd, unsigned long long size);
00072 int ceph_posix_unlink(XrdOucEnv* env, const char *pathname);
00073 DIR* ceph_posix_opendir(XrdOucEnv* env, const char *pathname);
00074 int ceph_posix_readdir(DIR* dirp, char *buff, int blen);
00075 int ceph_posix_closedir(DIR *dirp);
00076
00077 #endif // __XRD_CEPH_POSIX__