Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v5.8.2
v5.8.4
34 changes: 25 additions & 9 deletions src/XrdCeph/XrdCephOss.cc
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@ XrdCephOss::~XrdCephOss() {
extern unsigned int g_maxCephPoolIdx;
extern unsigned int g_cephAioWaitThresh;

bool g_calcStreamedAdler32;
bool g_storeStreamedAdler32;
bool g_logStreamedAdler32;

extern bool g_calcStreamedAdler32;
extern bool g_storeStreamedAdler32;
extern bool g_logStreamedAdler32;
extern double g_ECcorrectionFactor; // correction factor to apply to used space when EC pools are used, to get a better estimate of actual used space


int XrdCephOss::Configure(const char *configfn, XrdSysError &Eroute) {
Expand Down Expand Up @@ -372,7 +372,26 @@ int XrdCephOss::Configure(const char *configfn, XrdSysError &Eroute) {
Eroute.Emsg("Config", "Missing value for ceph.reportingpools in config file", configfn);
return 1;
}
// EC correction factor for pool reporting
if (!strncmp(var, "ceph.ECcorrectionFactor", 23)) { // size in bytes
var = Config.GetWord();
if (var) {
double value = strtod(var, 0);
if (value > 0 and value <= 1) {
g_ECcorrectionFactor = value;
Eroute.Emsg("Config", "ceph.ECcorrectionFactor", std::to_string(g_ECcorrectionFactor).c_str() );
} else {
Eroute.Emsg("Config", "Invalid value for ceph.ECcorrectionFactor in config file; enter a value between 0 and 1", configfn, var);
return 1;
}
} else {
Eroute.Emsg("Config", "Missing value for ceph.ECcorrectionFactor in config file. Setting default 8/11", configfn);
g_ECcorrectionFactor = 0.727272; // default 8/11 EC correction factor
return 1;
}
}
}

if (!strcmp(var, "ceph.streamed-cks-adler32")) { // Streaming Adler32 checksum

var = Config.GetWord();
Expand Down Expand Up @@ -674,20 +693,16 @@ int XrdCephOss::StatLS(XrdOucEnv &env, const char *charPath, char *buff, int &bl
XrdCephEroute.Say("Failed to get used space in pool ", spath.c_str());
return -EINVAL;
}

// Construct the object path
std::string spaceInfoPath = spath + ":" + (const char *)"__spaceinfo__";
totalSpace = getNumericAttr(spaceInfoPath.c_str(), "total_space", 24);
if (totalSpace < 0) {
XrdCephEroute.Say("Could not get 'total_space' attribute from ", spaceInfoPath.c_str());
return -EINVAL;
}

}
//
// Figure for 'usedSpace' already accounts for Erasure Coding overhead
//


freeSpace = totalSpace - usedSpace;
blen = formatStatLSResponse(buff, blen,
spath.c_str(), /* "oss.cgroup" */
Expand Down Expand Up @@ -747,3 +762,4 @@ XrdOssDF* XrdCephOss::newFile(const char *tident) {
return xrdCephOssDF;
}


13 changes: 6 additions & 7 deletions src/XrdCeph/XrdCephPosix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
return strdup(timeString);
}

constexpr char hex2ascii(char nibble) { return (0<= nibble && nibble<=9) ? nibble+'0' : nibble-10+'a'; }

Check warning on line 70 in src/XrdCeph/XrdCephPosix.cc

View workflow job for this annotation

GitHub Actions / Ubuntu (24.04-arm, gcc)

comparison is always true due to limited range of data type [-Wtype-limits]

Check warning on line 70 in src/XrdCeph/XrdCephPosix.cc

View workflow job for this annotation

GitHub Actions / Ubuntu (24.04-arm, gcc)

comparison is always true due to limited range of data type [-Wtype-limits]

Check warning on line 70 in src/XrdCeph/XrdCephPosix.cc

View workflow job for this annotation

GitHub Actions / Ubuntu (24.04-arm, gcc)

comparison is always true due to limited range of data type [-Wtype-limits]
constexpr char hiNibble(uint8_t hexbyte) { return (hexbyte & 0xf0) >> 4; }
constexpr char loNibble(uint8_t hexbyte) { return (hexbyte & 0x0f); }

Expand Down Expand Up @@ -156,12 +156,10 @@
std::map<unsigned int, unsigned long long> g_idxCntr;

//IJJ: Actions for Adler32 checksum
extern bool g_calcStreamedAdler32;
bool g_calcStreamedAdler32 = false;
extern bool g_logStreamedAdler32;
bool g_logStreamedAdler32 = false;
extern bool g_storeStreamedAdler32;
bool g_storeStreamedAdler32 = false;
bool g_calcStreamedAdler32;
bool g_logStreamedAdler32;
bool g_storeStreamedAdler32;
double g_ECcorrectionFactor;

FILE *g_cksLogFile;

Expand Down Expand Up @@ -645,7 +643,7 @@
IOCtxDict & ioDict = g_ioCtx[cephPoolIdx];
ioDict.insert(std::pair<std::string, librados::IoCtx*>(userAtPool, ioctx));
sDict.insert(std::pair<std::string, libradosstriper::RadosStriper*>
(userAtPool, striper)).first;

Check warning on line 646 in src/XrdCeph/XrdCephPosix.cc

View workflow job for this annotation

GitHub Actions / Ubuntu (24.04-arm, clang)

expression result unused [-Wunused-value]

Check warning on line 646 in src/XrdCeph/XrdCephPosix.cc

View workflow job for this annotation

GitHub Actions / Ubuntu (24.04, clang)

expression result unused [-Wunused-value]

Check warning on line 646 in src/XrdCeph/XrdCephPosix.cc

View workflow job for this annotation

GitHub Actions / Ubuntu (24.04, clang)

expression result unused [-Wunused-value]

Check warning on line 646 in src/XrdCeph/XrdCephPosix.cc

View workflow job for this annotation

GitHub Actions / Ubuntu (24.04-arm, clang)

expression result unused [-Wunused-value]

Check warning on line 646 in src/XrdCeph/XrdCephPosix.cc

View workflow job for this annotation

GitHub Actions / Ubuntu (24.04-arm, clang)

expression result unused [-Wunused-value]

Check warning on line 646 in src/XrdCeph/XrdCephPosix.cc

View workflow job for this annotation

GitHub Actions / Ubuntu (24.04, clang)

expression result unused [-Wunused-value]
}
return 1;
}
Expand Down Expand Up @@ -1638,7 +1636,7 @@

} else {

*usedSpace = stat[poolName].num_kb * 1024;
*usedSpace = stat[poolName].num_kb * 1024 * g_ECcorrectionFactor; // num_kb is in KB, convert to bytes and apply EC correction factor
return XrdOssOK;

}
Expand Down Expand Up @@ -1756,3 +1754,4 @@
delete ((DirIterator*)dirp);
return 0;
}

2 changes: 1 addition & 1 deletion xrootd.spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

Name: xrootd
Epoch: 1
Release: 96%{?dist}%{?with_clang:.clang}%{?with_asan:.asan}%{?with_openssl11:.ssl11}
Release: 92%{?dist}%{?with_clang:.clang}%{?with_asan:.asan}%{?with_openssl11:.ssl11}
Summary: Extended ROOT File Server
Group: System Environment/Daemons
License: LGPL-3.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND curl AND MIT AND Zlib
Expand Down
Loading