xrootd
Loading...
Searching...
No Matches
Public Member Functions | List of all members
XrdCephXAttr Class Reference

#include <XrdCephXAttr.hh>

Inheritance diagram for XrdCephXAttr:
Inheritance graph
[legend]
Collaboration diagram for XrdCephXAttr:
Collaboration graph
[legend]

Public Member Functions

 XrdCephXAttr ()
 Constructor.
 
virtual ~XrdCephXAttr ()
 Destructor.
 
virtual int Del (const char *Aname, const char *Path, int fd=-1)
 
virtual void Free (AList *aPL)
 
virtual int Get (const char *Aname, void *Aval, int Avsz, const char *Path, int fd=-1)
 
virtual int List (AList **aPL, const char *Path, int fd=-1, int getSz=0)
 
virtual int Set (const char *Aname, const void *Aval, int Avsz, const char *Path, int fd=-1, int isNew=0)
 
- Public Member Functions inherited from XrdSysXAttr
virtual int Copy (const char *iPath, int iFD, const char *oPath, int oFD, const char *Aname=0)
 
virtual XrdSysErrorSetMsgRoute (XrdSysError *errP)
 
 XrdSysXAttr ()
 Constructor and Destructor.
 
virtual ~XrdSysXAttr ()
 

Additional Inherited Members

- Protected Attributes inherited from XrdSysXAttr
XrdSysErrorSay
 

Detailed Description

This class implements XrdSysXAttr interface for usage with a CEPH storage. It should be loaded via the ofs.xattrlib 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.xattrlib directive may clash with one used in a ofs.osslib 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.

Constructor & Destructor Documentation

◆ XrdCephXAttr()

XrdCephXAttr::XrdCephXAttr ( )

Constructor.

◆ ~XrdCephXAttr()

virtual XrdCephXAttr::~XrdCephXAttr ( )
virtual

Destructor.

Member Function Documentation

◆ Del()

virtual int XrdCephXAttr::Del ( const char *  Aname,
const char *  Path,
int  fd = -1 
)
virtual

Remove an extended attribute.

Parameters
Aname-> The attribute name.
Path-> Path of the file whose attribute is to be removed.
fdIf >=0 is the file descriptor of the opened subject file.
Returns
=0 Attribute was successfully removed or did not exist.
<0 Attribute was not removed, the return value is -errno that describes the reason for the failure.

Implements XrdSysXAttr.

◆ Free()

virtual void XrdCephXAttr::Free ( AList aPL)
virtual

Release storage occupied by the Alist structure returned by List().

Parameters
aPL-> The first element of the AList structure.

Implements XrdSysXAttr.

◆ Get()

virtual int XrdCephXAttr::Get ( const char *  Aname,
void *  Aval,
int  Avsz,
const char *  Path,
int  fd = -1 
)
virtual

Get an attribute value and its size.

Parameters
Aname-> The attribute name.
Aval-> Buffer to receive the attribute value.
AvszLength of the buffer in bytes. Only up to this number of bytes should be returned. However, should Avsz be zero the the size of the attribute value should be returned and the Aval argument should be ignored.
Path-> Path of the file whose attribute is to be fetched.
fd-> If >=0 is the file descriptor of the opened subject file.
Returns
>0 The number of bytes placed in Aval. However, if avsz is zero then the value is the actual size of the attribute value.
=0 The attribute does not exist.
<0 The attribute value could not be returned. The returned value is -errno describing the reason.

Implements XrdSysXAttr.

◆ List()

virtual int XrdCephXAttr::List ( AList **  aPL,
const char *  Path,
int  fd = -1,
int  getSz = 0 
)
virtual

Get all of the attributes associated with a file.

Parameters
aPL-> the pointer to hold the first element of AList. The storage occupied by the returned AList must be released by calling Free().
Path-> Path of the file whose attributes are t be returned.
fd-> If >=0 is the file descriptor of the opened subject file.
getSzWhen != 0 then the size of the maximum attribute value should be returned. Otherwise, upon success 0 is returned.
Returns
>0 Attributes were returned and aPL points to the first attribute value. The returned value is the largest size of an attribute value encountered (getSz != 0).
=0 Attributes were returned and aPL points to the first attribute value (getSz == 0).
<0 The attribute values could not be returned. The returned value is -errno describing the reason.

Implements XrdSysXAttr.

◆ Set()

virtual int XrdCephXAttr::Set ( const char *  Aname,
const void *  Aval,
int  Avsz,
const char *  Path,
int  fd = -1,
int  isNew = 0 
)
virtual

Set an attribute.

Parameters
Aname-> The attribute name.
Aval-> Buffer holding the attribute value.
AvszLength of the buffer in bytes. This is the length of the attribute value which may contain binary data.
Path-> Path of the file whose attribute is to be set.
fd-> If >=0 is the file descriptor of the opened subject file.
isNewWhen !0 then the attribute must not exist (i.e. new). Otherwise, if it does exist, the value is replaced. In either case, if it does not exist it should be created.
Returns
=0 The attribute was successfully set.
<0 The attribute values could not be set. The returned value is -errno describing the reason.

Implements XrdSysXAttr.


The documentation for this class was generated from the following file: