mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-20 23:16:27 -05:00
config: rework global config, remove rwlock, make branches RCU like
Also added unit tests. Should have done separately but found a number of bugs.
This commit is contained in:
parent
2e4c6c5fd1
commit
538467b86d
327 changed files with 6691 additions and 3036 deletions
|
|
@ -31,6 +31,7 @@
|
|||
using std::string;
|
||||
using std::vector;
|
||||
|
||||
|
||||
namespace l
|
||||
{
|
||||
static
|
||||
|
|
@ -67,13 +68,13 @@ namespace l
|
|||
int err_)
|
||||
{
|
||||
int rv;
|
||||
const Config &config = Config::ro();
|
||||
Config::Read cfg;
|
||||
|
||||
if(config.moveonenospc.enabled == false)
|
||||
if(cfg->moveonenospc.enabled == false)
|
||||
return err_;
|
||||
|
||||
rv = fs::movefile_as_root(config.moveonenospc.policy,
|
||||
config.branches,
|
||||
rv = fs::movefile_as_root(cfg->moveonenospc.policy,
|
||||
cfg->branches,
|
||||
fi_->fusepath,
|
||||
&fi_->fd);
|
||||
if(rv == -1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue