mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-21 15:36:31 -05:00
add category to policies so as to distinguish between creates and searches
This commit is contained in:
parent
a5bf48c8ae
commit
51b6d3f647
32 changed files with 292 additions and 224 deletions
|
|
@ -42,11 +42,11 @@ using mergerfs::Policy;
|
|||
|
||||
static
|
||||
int
|
||||
_single_rename(const Policy::Func::Ptr searchFunc,
|
||||
const vector<string> &srcmounts,
|
||||
const size_t minfreespace,
|
||||
const Path &oldpath,
|
||||
const string &newpath)
|
||||
_single_rename(Policy::Func::Search searchFunc,
|
||||
const vector<string> &srcmounts,
|
||||
const size_t minfreespace,
|
||||
const Path &oldpath,
|
||||
const string &newpath)
|
||||
{
|
||||
int rv;
|
||||
const string fullnewpath = fs::make_path(oldpath.base,newpath);
|
||||
|
|
@ -75,12 +75,12 @@ _single_rename(const Policy::Func::Ptr searchFunc,
|
|||
|
||||
static
|
||||
int
|
||||
_rename(const Policy::Func::Ptr searchFunc,
|
||||
const Policy::Func::Ptr actionFunc,
|
||||
const vector<string> &srcmounts,
|
||||
const size_t minfreespace,
|
||||
const string &oldpath,
|
||||
const string &newpath)
|
||||
_rename(Policy::Func::Search searchFunc,
|
||||
Policy::Func::Action actionFunc,
|
||||
const vector<string> &srcmounts,
|
||||
const size_t minfreespace,
|
||||
const string &oldpath,
|
||||
const string &newpath)
|
||||
{
|
||||
int rv;
|
||||
int error;
|
||||
|
|
@ -115,8 +115,8 @@ namespace mergerfs
|
|||
const ugid::SetResetGuard ugid(fc->uid,fc->gid);
|
||||
const rwlock::ReadGuard readlock(&config.srcmountslock);
|
||||
|
||||
return _rename(*config.getattr,
|
||||
*config.rename,
|
||||
return _rename(config.getattr,
|
||||
config.rename,
|
||||
config.srcmounts,
|
||||
config.minfreespace,
|
||||
oldpath,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue