mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
Revert removal of readdir init setup, simplify cfg usage (#1520)
This commit is contained in:
parent
99c28ad3bc
commit
f64ff9ca1e
42 changed files with 388 additions and 426 deletions
|
|
@ -46,13 +46,12 @@ _move_and_pwrite(const char *buf_,
|
|||
{
|
||||
int err;
|
||||
ssize_t rv;
|
||||
Config::Read cfg;
|
||||
|
||||
if(cfg->moveonenospc.enabled == false)
|
||||
if(cfg.moveonenospc.enabled == false)
|
||||
return err_;
|
||||
|
||||
rv = fs::movefile_and_open_as_root(cfg->moveonenospc.policy,
|
||||
cfg->branches,
|
||||
rv = fs::movefile_and_open_as_root(cfg.moveonenospc.policy,
|
||||
cfg.branches,
|
||||
fi_->branch.path,
|
||||
fi_->fusepath,
|
||||
fi_->fd);
|
||||
|
|
@ -78,13 +77,12 @@ _move_and_pwriten(char const *buf_,
|
|||
{
|
||||
int err;
|
||||
ssize_t rv;
|
||||
Config::Read cfg;
|
||||
|
||||
if(cfg->moveonenospc.enabled == false)
|
||||
if(cfg.moveonenospc.enabled == false)
|
||||
return err_;
|
||||
|
||||
rv = fs::movefile_and_open_as_root(cfg->moveonenospc.policy,
|
||||
cfg->branches,
|
||||
rv = fs::movefile_and_open_as_root(cfg.moveonenospc.policy,
|
||||
cfg.branches,
|
||||
fi_->branch.path,
|
||||
fi_->fusepath,
|
||||
fi_->fd);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue