![]() |
XRootD
|
#include <XrdCephOss.hh>
Public Member Functions | |
XrdCephOss (const char *, XrdSysError &) | |
virtual | ~XrdCephOss () |
virtual int | Chmod (const char *, mode_t mode, XrdOucEnv *eP=0) |
int | Configure (const char *, XrdSysError &) |
virtual int | Create (const char *, const char *, mode_t, XrdOucEnv &, int opts=0) |
virtual int | Init (XrdSysLogger *, const char *) |
virtual int | Mkdir (const char *, mode_t mode, int mkpath=0, XrdOucEnv *eP=0) |
virtual XrdOssDF * | newDir (const char *tident) |
virtual XrdOssDF * | newFile (const char *tident) |
virtual int | Remdir (const char *, int Opts=0, XrdOucEnv *eP=0) |
virtual int | Rename (const char *, const char *, XrdOucEnv *eP1=0, XrdOucEnv *eP2=0) |
virtual int | Stat (const char *, struct stat *, int opts=0, XrdOucEnv *eP=0) |
Return status information for an object ID. More... | |
virtual int | StatFS (const char *path, char *buff, int &blen, XrdOucEnv *eP=0) |
virtual int | StatLS (XrdOucEnv &env, const char *path, char *buff, int &blen) |
Report on disk space use in this pool. More... | |
virtual int | StatVS (XrdOssVSInfo *sP, const char *sname=0, int updt=0) |
virtual int | Truncate (const char *, unsigned long long, XrdOucEnv *eP=0) |
virtual int | Unlink (const char *path, int Opts=0, XrdOucEnv *eP=0) |
![]() | |
XrdOss () | |
Constructor and Destructor. More... | |
virtual | ~XrdOss () |
virtual void | Connect (XrdOucEnv &env) |
virtual void | Disc (XrdOucEnv &env) |
virtual void | EnvInfo (XrdOucEnv *envP) |
virtual uint64_t | Features () |
virtual int | FSctl (int cmd, int alen, const char *args, char **resp=0) |
virtual int | Init (XrdSysLogger *lp, const char *cfn, XrdOucEnv *envP) |
virtual int | Lfn2Pfn (const char *Path, char *buff, int blen) |
virtual const char * | Lfn2Pfn (const char *Path, char *buff, int blen, int &rc) |
virtual int | Reloc (const char *tident, const char *path, const char *cgName, const char *anchor=0) |
virtual int | StatPF (const char *path, struct stat *buff) |
virtual int | StatPF (const char *path, struct stat *buff, int opts) |
virtual int | Stats (char *buff, int blen) |
virtual int | StatXA (const char *path, char *buff, int &blen, XrdOucEnv *envP=0) |
virtual int | StatXP (const char *path, unsigned long long &attr, XrdOucEnv *envP=0) |
Public Attributes | |
int | m_useDefaultPreadAlg = 0 |
int | m_useDefaultReadvAlg = 0 |
Additional Inherited Members | |
![]() | |
static const int | PF_csVer = 0x00000001 |
verified file checksums present More... | |
static const int | PF_csVun = 0x00000002 |
unverified file checksums present More... | |
static const int | PF_dInfo = 0x00000001 |
static const int | PF_dNums = 0x00000002 |
static const int | PF_dStat = 0x00000008 |
static const int | PF_isLFN = 0x00000004 |
This class implements XrdOss interface for usage with a CEPH storage. It should be loaded via the ofs.osslib directive.
This plugin is able to use any pool of ceph with any userId. There are several ways to provide the pool and userId to be used for a given operation. Here is the ordered list of possibilities. First one defined wins :
Note that the definition of a default via the ofs.osslib directive may clash with one used in a ofs.xattrlib directive. In case both directives have a default and they are different, the behavior is not defined. In case one of the two only has a default, it will be applied for both plugins.
Definition at line 55 of file XrdCephOss.hh.
XrdCephOss::XrdCephOss | ( | const char * | configfn, |
XrdSysError & | Eroute | ||
) |
Definition at line 156 of file XrdCephOss.cc.
References Configure().
|
virtual |
Definition at line 160 of file XrdCephOss.cc.
References ceph_posix_disconnect_all().
|
virtual |
Change file mode settings.
path | - Pointer to the path of the file in question. |
mode | - The new file mode setting. |
envP | - Pointer to environmental information. |
Implements XrdOss.
Definition at line 381 of file XrdCephOss.cc.
int XrdCephOss::Configure | ( | const char * | configfn, |
XrdSysError & | Eroute | ||
) |
Definition at line 168 of file XrdCephOss.cc.
References XrdCms::Config, XrdSysError::Emsg(), XrdOucEnv::Export(), g_cephAioWaitThresh, g_maxCephPoolIdx, g_namelib, XrdOucN2NLoader::Load(), m_useDefaultPreadAlg, m_useDefaultReadvAlg, open(), and XrdOssGetStorageSystem().
Referenced by XrdCephOss().
|
virtual |
Create file.
tid | - Pointer to the trace identifier. |
path | - Pointer to the path of the file to create. |
mode | - The new file mode setting. |
env | - Reference to environmental information. |
opts | - Create options: XRDOSS_mkpath - create dir path if it does not exist. XRDOSS_new - the file must not already exist. oflags<<8 - open flags shifted 8 bits to the left/ |
Implements XrdOss.
Definition at line 385 of file XrdCephOss.cc.
|
virtual |
Initialize the storage system V1 (deprecated).
lp | - Pointer to the message logging object. |
cfn | - Pointer to the configuration file. |
Implements XrdOss.
Definition at line 390 of file XrdCephOss.cc.
|
virtual |
Create a directory.
path | - Pointer to the path of the directory to be created. |
mode | - The directory mode setting. |
mkpath | - When true the path is created if it does not exist. |
envP | - Pointer to environmental information. |
Implements XrdOss.
Definition at line 393 of file XrdCephOss.cc.
|
virtual |
Obtain a new director object to be used for future directory requests.
tident | - The trace identifier. |
Implements XrdOss.
Definition at line 658 of file XrdCephOss.cc.
|
virtual |
Obtain a new file object to be used for a future file requests.
tident | - The trace identifier. |
Implements XrdOss.
Definition at line 662 of file XrdCephOss.cc.
|
virtual |
Remove a directory.
path | - Pointer to the path of the directory to be removed. |
Opts | - The processing options: XRDOSS_Online - only remove online copy XRDOSS_isPFN - path is already translated. |
envP | - Pointer to environmental information. |
Implements XrdOss.
Definition at line 398 of file XrdCephOss.cc.
|
virtual |
Rename a file or directory.
oPath | - Pointer to the path to be renamed. |
nPath | - Pointer to the path oPath is to have. |
oEnvP | - Environmental information for oPath. |
nEnvP | - Environmental information for nPath. |
Implements XrdOss.
Definition at line 402 of file XrdCephOss.cc.
|
virtual |
Return status information for an object ID.
Populate a struct stat* with information on an object ID. Determine whether the request relates to a pool name for disk space reporting via StatLS. If not, handle an object path or the notional root element "/"
(in) | path the object ID |
(out) | buff receive the status information |
(in) | opts not used |
(in) | env not used |
Implementation of enhancements: Jyothish Thomas STFC RAL, jyoth, 2022 Ian Johnson STFC RAL, ish. thoma s@st fc.ac .ukian.j, 2022, 2023 ohns on@st fc.a c.uk
Implements XrdOss.
Definition at line 454 of file XrdCephOss.cc.
References ceph_posix_stat(), m_translateFileName(), XrdSysError::Say(), XrdCephEroute, and XrdOssOK.
|
virtual |
Return filesystem physical space information associated with a path.
path | - Path in the partition in question. |
buff | - Pointer to the buffer to hold the information. |
blen | - Length of the buffer. This is updated with the actual number of bytes placed in the buffer as in snprintf(). |
envP | - Pointer to environmental information. |
Reimplemented from XrdOss.
Definition at line 524 of file XrdCephOss.cc.
References XrdOssVSInfo::Free, XrdSysError::Say(), StatVS(), XrdOssVSInfo::Total, XrdOssVSInfo::Usage, XrdCephEroute, and XrdOssOK.
|
virtual |
Report on disk space use in this pool.
Handle a request for the amount of space used in a Ceph pool
(in) | env not used |
(in) | path name of the pool |
(out) | buff location for string containing OSS key-value pairs for disk space used, free, etc |
(out) | blen set to length of buff |
Implementation: Jyothish Thomas STFC RAL, jyoth, 2022 Ian Johnson STFC RAL, ish. thoma s@st fc.ac .ukian.j, 2022, 2023 ohns on@st fc.a c.uk
Reimplemented from XrdOss.
Definition at line 581 of file XrdCephOss.cc.
References ceph_posix_stat_pool(), extractPool(), formatStatLSResponse(), getNumericAttr(), m_translateFileName(), XrdSysError::Say(), XrdCephEroute, and XrdOssOK.
|
virtual |
Return space information for a space name.
vsP | - Pointer to the XrdOssVSInfo object to hold results. It should be fully initialized (i.e. a new copy). |
sname | - Pointer to the space name. If the name starts with a plus (e.g. "+public"), partition information is returned, should it exist. If nil, space information for all spaces is returned. See, XrdOssVS.hh for more info. |
updt | - When true, a space update occurrs prior to a query. |
Reimplemented from XrdOss.
Definition at line 540 of file XrdCephOss.cc.
References ceph_posix_statfs(), XrdOssVSInfo::Extents, XrdOssVSInfo::Free, XrdOssVSInfo::Large, XrdOssVSInfo::LFree, XrdSysError::Say(), XrdOssVSInfo::Total, XrdOssVSInfo::Usage, XrdCephEroute, and XrdOssOK.
Referenced by StatFS().
|
virtual |
Truncate a file.
path | - Pointer to the path of the file to be truncated. |
fsize | - The size that the file is to have. |
envP | - Pointer to environmental information. |
Implements XrdOss.
Definition at line 638 of file XrdCephOss.cc.
References ceph_posix_truncate(), XrdSysError::Say(), and XrdCephEroute.
|
virtual |
Remove a file.
path | - Pointer to the path of the file to be removed. |
Opts | - Options: XRDOSS_isMIG - this is a migratable path. XRDOSS_isPFN - do not apply name2name to path. XRDOSS_Online - remove only the online copy. |
envP | - Pointer to environmental information. |
Implements XrdOss.
Definition at line 649 of file XrdCephOss.cc.
References ceph_posix_unlink(), XrdSysError::Say(), and XrdCephEroute.
int XrdCephOss::m_useDefaultPreadAlg = 0 |
Definition at line 78 of file XrdCephOss.hh.
Referenced by Configure(), XrdCephOssBufferedFile::createBuffer(), and XrdCephOssFile::Read().
int XrdCephOss::m_useDefaultReadvAlg = 0 |
Definition at line 80 of file XrdCephOss.hh.
Referenced by Configure(), and XrdCephOssFile::ReadV().