diff --git a/src/XrdCeph/XrdCephOss.cc b/src/XrdCeph/XrdCephOss.cc index a3ec4a78c38..b25e7171d22 100644 --- a/src/XrdCeph/XrdCephOss.cc +++ b/src/XrdCeph/XrdCephOss.cc @@ -108,7 +108,15 @@ int XrdCephOss::Stat(const char* path, int opts, XrdOucEnv* env) { try { - return ceph_posix_stat(env, path, buff); + if (!strcmp(path, "/")) { + // special case of a stat made by the locate interface + // we intend to then list all files + memset(buff, 0, sizeof(*buff)); + buff->st_mode = S_IFDIR | 0700; + return 0; + } else { + return ceph_posix_stat(env, path, buff); + } } catch (std::exception e) { XrdCephEroute.Say("stat : invalid syntax in file parameters"); return -EINVAL; diff --git a/src/XrdCeph/XrdCephPosix.cc b/src/XrdCeph/XrdCephPosix.cc index d822c2447df..4f17fb7fa21 100644 --- a/src/XrdCeph/XrdCephPosix.cc +++ b/src/XrdCeph/XrdCephPosix.cc @@ -425,7 +425,11 @@ static librados::IoCtx* getIoCtx(const CephFile& file) { if (0 == striper) { return 0; } - return g_ioCtx[file.pool]; + std::stringstream ss; + ss << file.userId << '@' << file.pool << ',' << file.nbStripes << ',' + << file.stripeUnit << ',' << file.objectSize; + std::string userAtPool = ss.str(); + return g_ioCtx[userAtPool]; } void ceph_posix_disconnect_all() {