Skip to content

Commit 8c991cd

Browse files
committed
MGM: make the Fuse bypass application name configurable (default 'fuse::restic') via EOS_MGM_FUSEX_NOSTALL_APP
1 parent 31fd5cf commit 8c991cd

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

mgm/XrdMgmOfs.hh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,11 @@ namespace eos::mgm::placement
220220
class FSScheduler;
221221
}
222222

223+
namespace eos::mgm::FuseServer
224+
{
225+
class Server;
226+
}
227+
223228
enum class NamespaceState {
224229
kDown = 0,
225230
kBooting = 1,
@@ -252,6 +257,7 @@ public:
252257
friend class eos::mgm::SpaceCmd;
253258
friend class eos::mgm::FsckEntry;
254259
friend class eos::mgm::NsCmd;
260+
friend class eos::mgm::FuseServer::Server;
255261
//----------------------------------------------------------------------------
256262
//! Constructor
257263
//----------------------------------------------------------------------------
@@ -2157,6 +2163,8 @@ private:
21572163
static thread_local eos::common::LogId tlLogId;
21582164
//! Space/quota which is requested when placing a file via FUSE(x)
21592165
uint64_t mFusePlacementBooking;
2166+
//! NoStall FUSE applicationg name
2167+
std::string mFuseNoStallApp;
21602168

21612169
//----------------------------------------------------------------------------
21622170
//! Convert error code to string representation

mgm/XrdMgmOfs/ShouldStall.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ XrdMgmOfs::ShouldStall(const char* function,
6363
size_t uid_threads = 1;
6464

6565
if (stall) {
66-
if ((vid.uid > 3) && (functionname != "stat") && (vid.app != "fuse::restic")) {
66+
if ((vid.uid > 3) && (functionname != "stat") && (vid.app != gOFS->mFuseNoStallApp)) {
6767
if ((stalltime = gOFS->mTracker.ShouldStall(vid.uid, saturated, uid_threads))) {
6868
smsg = SSTR("operate - uid=" << vid.uid << " exceeding the "
6969
"thread pool limit");
@@ -129,7 +129,7 @@ XrdMgmOfs::ShouldStall(const char* function,
129129
std::map<std::string, std::string>::const_iterator it;
130130

131131
if ((functionname != "stat") && // never stall stats
132-
(vid.app != "fuse::restic")) {
132+
(vid.app != gOFS->mFuseNoStallApp)) {
133133
for (it = Access::gStallRules.begin();
134134
it != Access::gStallRules.end();
135135
it++) {

mgm/XrdMgmOfsConfigure.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1645,6 +1645,13 @@ XrdMgmOfs::Configure(XrdSysError& Eroute)
16451645
MgmConfigAutoLoad = getenv("EOS_AUTOLOAD_CONFIG");
16461646
}
16471647

1648+
// NoStall Fuse Application Name
1649+
if (getenv("EOS_MGM_FUSEX_NOSTALL_APP")) {
1650+
mFuseNoStallApp = getenv("EOS_MGM_FUSEX_NOSTALL_APP");
1651+
} else {
1652+
mFuseNoStallApp = "fuse::restic";
1653+
}
1654+
16481655
XrdOucString instancepath = "/eos/";
16491656
MgmProcPath = "/eos/";
16501657
XrdOucString subpath = MgmOfsInstanceName;

misc/etc/sysconfig/eos_env.example

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,10 @@ EOS_TTY_BROACAST_EGREP="\"CRIT|ALERT|EMERG|PROGRESS\""
364364
# ------------------------------------------------------------------
365365

366366
# uncomment to change the minimum needed size available to create a new file
367-
# EOS_MGM_FUSE_BOOKING_SIZE = 5368709120
367+
# EOS_MGM_FUSE_BOOKING_SIZE=5368709120
368368

369+
# define the name of the FUSE application, which can by-pass throttling & stalling
370+
# EOS_MGM_FUSEX_NOSTALL_APP="fuse::restic"
369371

370372
# ------------------------------------------------------------------
371373
# MGM 'xrdfs query space' configuration

0 commit comments

Comments
 (0)