Skip to content

Commit

Permalink
XrdCeph: Set the flags to 0666 when stating a ceph striped object
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastien Ponce authored and ljanyst committed Feb 23, 2015
1 parent 9febe8a commit 285a56a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/XrdCeph/ceph_posix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,8 @@ int ceph_posix_fstat(int fd, struct stat *buf) {
CephFileRef &fr = it->second;
logwrapper((char*)"ceph_stat: fd %d\n", fd);
// minimal stat : only size and times are filled
// atime, mtime and ctime are set all to the same value
// mode is set arbitrarily to 0666
libradosstriper::RadosStriper *striper = getRadosStriper(fr);
if (0 == striper) {
return -EINVAL;
Expand All @@ -360,7 +362,8 @@ int ceph_posix_fstat(int fd, struct stat *buf) {
return -rc;
}
buf->st_mtime = buf->st_atime;
buf->st_ctime = buf->st_atime;
buf->st_ctime = buf->st_atime;
buf->st_mode = 0666;
return 0;
} else {
return -EBADF;
Expand All @@ -370,6 +373,8 @@ int ceph_posix_fstat(int fd, struct stat *buf) {
int ceph_posix_stat(XrdOucEnv* env, const char *pathname, struct stat *buf) {
logwrapper((char*)"ceph_stat : %s\n", pathname);
// minimal stat : only size and times are filled
// atime, mtime and ctime are set all to the same value
// mode is set arbitrarily to 0666
libradosstriper::RadosStriper *striper = getRadosStriper(getCephFile(pathname, env));
if (0 == striper) {
return -EINVAL;
Expand All @@ -388,6 +393,7 @@ int ceph_posix_stat(XrdOucEnv* env, const char *pathname, struct stat *buf) {
}
buf->st_mtime = buf->st_atime;
buf->st_ctime = buf->st_atime;
buf->st_mode = 0666;
return 0;
}

Expand Down

0 comments on commit 285a56a

Please sign in to comment.