#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/xattr.h>
#include <iostream>
#include <libgen.h>
#include <unistd.h>
#include <stdlib.h>
#include <syslog.h>
#include "XrdFfs/XrdFfsPosix.hh"
#include "XrdPosix/XrdPosixXrootd.hh"
#include "XrdFfs/XrdFfsMisc.hh"
#include "XrdFfs/XrdFfsDent.hh"
#include "XrdFfs/XrdFfsQueue.hh"
Go to the source code of this file.
Classes | |
struct | XrdFfsPosixX_deleteall_args |
struct | XrdFfsPosixX_readdirall_args |
struct | XrdFfsPosixX_statvfsall_args |
struct | XrdFfsPosixX_statall_args |
Defines | |
#define | _FILE_OFFSET_BITS 64 |
#define | ENOATTR ENODATA |
Functions | |
int | XrdFfsPosix_stat (const char *path, struct stat *buf) |
DIR * | XrdFfsPosix_opendir (const char *path) |
dirent * | XrdFfsPosix_readdir (DIR *dirp) |
int | XrdFfsPosix_closedir (DIR *dirp) |
int | XrdFfsPosix_mkdir (const char *path, mode_t mode) |
int | XrdFfsPosix_rmdir (const char *path) |
int | XrdFfsPosix_open (const char *path, int oflags, mode_t mode) |
int | XrdFfsPosix_close (int fildes) |
off_t | XrdFfsPosix_lseek (int fildes, off_t offset, int whence) |
ssize_t | XrdFfsPosix_read (int fildes, void *buf, size_t nbyte) |
ssize_t | XrdFfsPosix_pread (int fildes, void *buf, size_t nbyte, off_t offset) |
ssize_t | XrdFfsPosix_write (int fildes, const void *buf, size_t nbyte) |
ssize_t | XrdFfsPosix_pwrite (int fildes, const void *buf, size_t nbyte, off_t offset) |
int | XrdFfsPosix_fsync (int fildes) |
int | XrdFfsPosix_unlink (const char *path) |
int | XrdFfsPosix_rename (const char *oldpath, const char *newpath) |
int | XrdFfsPosix_ftruncate (int fildes, off_t offset) |
int | XrdFfsPosix_truncate (const char *path, off_t Size) |
long long | XrdFfsPosix_getxattr (const char *path, const char *name, void *value, unsigned long long size) |
void * | XrdFfsPosix_x_deleteall (void *x) |
int | XrdFfsPosix_deleteall (const char *rdrurl, const char *path, uid_t user_uid, mode_t st_mode) |
int | XrdFfsPosix_unlinkall (const char *rdrurl, const char *path, uid_t user_uid) |
int | XrdFfsPosix_rmdirall (const char *rdrurl, const char *path, uid_t user_uid) |
int | XrdFfsPosix_renameall (const char *rdrurl, const char *from, const char *to, uid_t user_uid) |
int | XrdFfsPosix_truncateall (const char *rdrurl, const char *path, off_t size, uid_t user_uid) |
void * | XrdFfsPosix_x_readdirall (void *x) |
int | XrdFfsPosix_readdirall (const char *rdrurl, const char *path, char ***direntarray, uid_t user_uid) |
void * | XrdFfsPosix_x_statvfsall (void *x) |
int | XrdFfsPosix_statvfsall (const char *rdrurl, const char *path, struct statvfs *stbuf, uid_t user_uid) |
void * | XrdFfsPosix_x_statall (void *x) |
int | XrdFfsPosix_statall (const char *rdrurl, const char *path, struct stat *stbuf, uid_t user_uid) |
#define _FILE_OFFSET_BITS 64 |
Definition at line 10 of file XrdFfsPosix.cc.
#define ENOATTR ENODATA |
Definition at line 21 of file XrdFfsPosix.cc.
Referenced by XrdPosixXrootd::Getxattr(), and XrdFfsPosix_getxattr().
int XrdFfsPosix_close | ( | int | fildes | ) |
int XrdFfsPosix_closedir | ( | DIR * | dirp | ) |
Definition at line 65 of file XrdFfsPosix.cc.
References XrdPosixXrootd::Closedir().
Referenced by XrdFfsPosix_x_readdirall().
int XrdFfsPosix_deleteall | ( | const char * | rdrurl, | |
const char * | path, | |||
uid_t | user_uid, | |||
mode_t | st_mode | |||
) |
Definition at line 212 of file XrdFfsPosix.cc.
References XrdFfsQueueTasks::args, i, strcat(), XrdFfs_MAX_NUM_NODES, XrdFfsMisc_get_all_urls(), XrdFfsMisc_xrd_secsss_editurl(), XrdFfsPosix_x_deleteall(), and XrdFfsQueue_create_task().
Referenced by XrdFfsPosix_rmdirall(), and XrdFfsPosix_unlinkall().
int XrdFfsPosix_fsync | ( | int | fildes | ) |
int XrdFfsPosix_ftruncate | ( | int | fildes, | |
off_t | offset | |||
) |
long long XrdFfsPosix_getxattr | ( | const char * | path, | |
const char * | name, | |||
void * | value, | |||
unsigned long long | size | |||
) |
Definition at line 140 of file XrdFfsPosix.cc.
References bufsize, ENOATTR, XrdPosixXrootd::Getxattr(), NULL, strcpy(), strtok_r, and val.
Referenced by XrdFfsPosix_x_statvfsall().
off_t XrdFfsPosix_lseek | ( | int | fildes, | |
off_t | offset, | |||
int | whence | |||
) |
int XrdFfsPosix_mkdir | ( | const char * | path, | |
mode_t | mode | |||
) |
int XrdFfsPosix_open | ( | const char * | path, | |
int | oflags, | |||
mode_t | mode | |||
) |
DIR* XrdFfsPosix_opendir | ( | const char * | path | ) |
Definition at line 55 of file XrdFfsPosix.cc.
References XrdPosixXrootd::Opendir().
Referenced by XrdFfsPosix_x_readdirall().
ssize_t XrdFfsPosix_pread | ( | int | fildes, | |
void * | buf, | |||
size_t | nbyte, | |||
off_t | offset | |||
) |
ssize_t XrdFfsPosix_pwrite | ( | int | fildes, | |
const void * | buf, | |||
size_t | nbyte, | |||
off_t | offset | |||
) |
Definition at line 111 of file XrdFfsPosix.cc.
References XrdPosixXrootd::Pwrite().
Referenced by XrdFfsWcache_flush(), and XrdFfsWcache_pwrite().
ssize_t XrdFfsPosix_read | ( | int | fildes, | |
void * | buf, | |||
size_t | nbyte | |||
) |
struct dirent* XrdFfsPosix_readdir | ( | DIR * | dirp | ) |
Definition at line 60 of file XrdFfsPosix.cc.
References XrdPosixXrootd::Readdir().
Referenced by XrdFfsPosix_x_readdirall().
int XrdFfsPosix_readdirall | ( | const char * | rdrurl, | |
const char * | path, | |||
char *** | direntarray, | |||
uid_t | user_uid | |||
) |
Definition at line 418 of file XrdFfsPosix.cc.
References XrdFfsQueueTasks::args, i, j, n, strcat(), XrdFfs_MAX_NUM_NODES, XrdFfsMisc_get_all_urls(), XrdFfsMisc_xrd_secsss_editurl(), XrdFfsPosix_x_readdirall(), and XrdFfsQueue_create_task().
Referenced by XrdPssDir::Opendir().
int XrdFfsPosix_rename | ( | const char * | oldpath, | |
const char * | newpath | |||
) |
Definition at line 126 of file XrdFfsPosix.cc.
References XrdPosixXrootd::Rename().
Referenced by XrdFfsPosix_renameall().
int XrdFfsPosix_renameall | ( | const char * | rdrurl, | |
const char * | from, | |||
const char * | to, | |||
uid_t | user_uid | |||
) |
Definition at line 284 of file XrdFfsPosix.cc.
References free(), i, stat, strcat(), XrdFfs_MAX_NUM_NODES, XrdFfsMisc_get_all_urls(), XrdFfsMisc_xrd_secsss_editurl(), XrdFfsPosix_rename(), and XrdFfsPosix_stat().
Referenced by XrdPssSys::Rename().
int XrdFfsPosix_rmdir | ( | const char * | path | ) |
Definition at line 75 of file XrdFfsPosix.cc.
References XrdPosixXrootd::Rmdir().
Referenced by XrdFfsPosix_x_deleteall().
int XrdFfsPosix_rmdirall | ( | const char * | rdrurl, | |
const char * | path, | |||
uid_t | user_uid | |||
) |
Definition at line 279 of file XrdFfsPosix.cc.
References XrdFfsPosix_deleteall().
Referenced by XrdPssSys::Remdir().
int XrdFfsPosix_stat | ( | const char * | path, | |
struct stat * | buf | |||
) |
Definition at line 39 of file XrdFfsPosix.cc.
References S_IXUSR, and XrdPosixXrootd::Stat().
Referenced by XrdFfsMisc_get_current_url(), XrdFfsPosix_renameall(), XrdFfsPosix_statall(), XrdFfsPosix_truncateall(), and XrdFfsPosix_x_statall().
int XrdFfsPosix_statall | ( | const char * | rdrurl, | |
const char * | path, | |||
struct stat * | stbuf, | |||
uid_t | user_uid | |||
) |
Definition at line 692 of file XrdFfsPosix.cc.
References XrdFfsQueueTasks::args, dir(), free(), p1(), p2(), stat, strcat(), XrdFfs_MAX_NUM_NODES, XrdFfsDent_cache_search(), XrdFfsMisc_get_all_urls(), XrdFfsMisc_xrd_secsss_editurl(), XrdFfsPosix_stat(), XrdFfsPosix_x_statall(), and XrdFfsQueue_create_task().
int XrdFfsPosix_statvfsall | ( | const char * | rdrurl, | |
const char * | path, | |||
struct statvfs * | stbuf, | |||
uid_t | user_uid | |||
) |
Definition at line 610 of file XrdFfsPosix.cc.
References XrdFfsQueueTasks::args, NULL, XrdFfsPosixX_statvfsall_args::osscgroup, statvfs, strcat(), XrdFfs_MAX_NUM_NODES, XrdFfsMisc_get_all_urls(), XrdFfsPosix_x_statvfsall(), and XrdFfsQueue_create_task().
int XrdFfsPosix_truncate | ( | const char * | path, | |
off_t | Size | |||
) |
Definition at line 135 of file XrdFfsPosix.cc.
References XrdPosixXrootd::Truncate().
Referenced by XrdFfsPosix_truncateall().
int XrdFfsPosix_truncateall | ( | const char * | rdrurl, | |
const char * | path, | |||
off_t | size, | |||
uid_t | user_uid | |||
) |
Definition at line 334 of file XrdFfsPosix.cc.
References free(), i, S_ISREG, stat, strcat(), XrdFfs_MAX_NUM_NODES, XrdFfsMisc_get_all_urls(), XrdFfsMisc_xrd_secsss_editurl(), XrdFfsPosix_stat(), and XrdFfsPosix_truncate().
int XrdFfsPosix_unlink | ( | const char * | path | ) |
Definition at line 121 of file XrdFfsPosix.cc.
References XrdPosixXrootd::Unlink().
Referenced by XrdFfsPosix_x_deleteall().
int XrdFfsPosix_unlinkall | ( | const char * | rdrurl, | |
const char * | path, | |||
uid_t | user_uid | |||
) |
Definition at line 274 of file XrdFfsPosix.cc.
References XrdFfsPosix_deleteall().
Referenced by XrdPssSys::Unlink().
ssize_t XrdFfsPosix_write | ( | int | fildes, | |
const void * | buf, | |||
size_t | nbyte | |||
) |
void* XrdFfsPosix_x_deleteall | ( | void * | x | ) |
Definition at line 199 of file XrdFfsPosix.cc.
References XrdFfsPosixX_deleteall_args::err, NULL, XrdFfsPosixX_deleteall_args::res, S_ISDIR, S_ISREG, XrdFfsPosixX_deleteall_args::st_mode, XrdFfsPosixX_deleteall_args::url, XrdFfsPosix_rmdir(), and XrdFfsPosix_unlink().
Referenced by XrdFfsPosix_deleteall().
void* XrdFfsPosix_x_readdirall | ( | void * | x | ) |
Definition at line 389 of file XrdFfsPosix.cc.
References XrdFfsPosixX_readdirall_args::dents, XrdFfsPosixX_readdirall_args::err, NULL, XrdFfsPosixX_readdirall_args::res, XrdFfsPosixX_readdirall_args::url, XrdFfsDent_names_add(), XrdFfsPosix_closedir(), XrdFfsPosix_opendir(), and XrdFfsPosix_readdir().
Referenced by XrdFfsPosix_readdirall().
void* XrdFfsPosix_x_statall | ( | void * | x | ) |
Definition at line 683 of file XrdFfsPosix.cc.
References XrdFfsPosixX_statall_args::err, XrdFfsPosixX_statall_args::res, XrdFfsPosixX_statall_args::stbuf, XrdFfsPosixX_statall_args::url, and XrdFfsPosix_stat().
Referenced by XrdFfsPosix_statall().
void* XrdFfsPosix_x_statvfsall | ( | void * | x | ) |
Definition at line 552 of file XrdFfsPosix.cc.
References XrdFfsPosixX_statvfsall_args::err, NULL, XrdFfsPosixX_statvfsall_args::osscgroup, XrdFfsPosixX_statvfsall_args::res, XrdFfsPosixX_statvfsall_args::stbuf, XrdFfsPosixX_statvfsall_args::url, and XrdFfsPosix_getxattr().
Referenced by XrdFfsPosix_statvfsall().