-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
XrdCeph: Second version of the CEPH xrootd plugin
It now handles userIds and pools via the syntax [[userId@]pool/]path for the fileName. It also includes a second plugin dedicated to xattr management
- Loading branch information
Showing
11 changed files
with
560 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#include <XrdVersion.hh> | ||
#include <XrdCeph/ceph_posix.h> | ||
#include "CephXAttr.hh" | ||
|
||
extern "C" | ||
{ | ||
XrdSysXAttr* | ||
XrdSysGetXAttrObject(XrdSysError *errP, | ||
const char *config_fn, | ||
const char *parms) | ||
{ | ||
ceph_posix_set_defaults(parms); | ||
return new CephXAttr(); | ||
} | ||
} | ||
|
||
CephXAttr::CephXAttr() {} | ||
|
||
CephXAttr::~CephXAttr() {} | ||
|
||
int CephXAttr::Del(const char *Aname, const char *Path, int fd) { | ||
return ceph_posix_removexattr(0, Path, Aname); | ||
} | ||
|
||
void CephXAttr::Free(AList *aPL) { | ||
ceph_posix_freexattrlist(aPL); | ||
} | ||
|
||
int CephXAttr::Get(const char *Aname, void *Aval, int Avsz, | ||
const char *Path, int fd) { | ||
if (fd >= 0) { | ||
return ceph_posix_fgetxattr(fd, Aname, Aval, Avsz); | ||
} else { | ||
return ceph_posix_getxattr(0, Path, Aname, Aval, Avsz); | ||
} | ||
} | ||
|
||
int CephXAttr::List(AList **aPL, const char *Path, int fd, int getSz) { | ||
if (fd > 0) { | ||
return ceph_posix_flistxattrs(fd, aPL, getSz); | ||
} else { | ||
return ceph_posix_listxattrs(0, Path, aPL, getSz); | ||
} | ||
} | ||
|
||
int CephXAttr::Set(const char *Aname, const void *Aval, int Avsz, | ||
const char *Path, int fd, int isNew) { | ||
if (fd >= 0) { | ||
return ceph_posix_fsetxattr(fd, Aname, Aval, Avsz, 0); | ||
} else { | ||
return ceph_posix_setxattr(0, Path, Aname, Aval, Avsz, 0); | ||
} | ||
} | ||
|
||
XrdVERSIONINFO(XrdSysGetXAttrObject, CephXattr); |
Oops, something went wrong.