mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
Rework movefile and cow break to use copyfile (#1488)
This commit is contained in:
parent
264c5600f8
commit
e216a81a27
19 changed files with 677 additions and 659 deletions
|
|
@ -19,7 +19,7 @@
|
|||
#include "fileinfo.hpp"
|
||||
#include "fs_close.hpp"
|
||||
#include "fs_dup2.hpp"
|
||||
#include "fs_movefile.hpp"
|
||||
#include "fs_movefile_and_open.hpp"
|
||||
#include "fs_pwrite.hpp"
|
||||
#include "fs_pwriten.hpp"
|
||||
|
||||
|
|
@ -51,10 +51,11 @@ namespace l
|
|||
if(cfg->moveonenospc.enabled == false)
|
||||
return err_;
|
||||
|
||||
rv = fs::movefile_as_root(cfg->moveonenospc.policy,
|
||||
cfg->branches,
|
||||
fi_->fusepath,
|
||||
fi_->fd);
|
||||
rv = fs::movefile_and_open_as_root(cfg->moveonenospc.policy,
|
||||
cfg->branches,
|
||||
fi_->branch.path,
|
||||
fi_->fusepath,
|
||||
fi_->fd);
|
||||
if(rv < 0)
|
||||
return err_;
|
||||
|
||||
|
|
@ -82,10 +83,11 @@ namespace l
|
|||
if(cfg->moveonenospc.enabled == false)
|
||||
return err_;
|
||||
|
||||
rv = fs::movefile_as_root(cfg->moveonenospc.policy,
|
||||
cfg->branches,
|
||||
fi_->fusepath,
|
||||
fi_->fd);
|
||||
rv = fs::movefile_and_open_as_root(cfg->moveonenospc.policy,
|
||||
cfg->branches,
|
||||
fi_->branch.path,
|
||||
fi_->fusepath,
|
||||
fi_->fd);
|
||||
if(rv < 0)
|
||||
return err_;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue