Browse Source

add category to policies so as to distinguish between creates and searches

pull/78/head
Antonio SJ Musumeci 10 years ago
parent
commit
51b6d3f647
  1. 5
      src/access.cpp
  2. 4
      src/chmod.cpp
  3. 4
      src/chown.cpp
  4. 8
      src/create.cpp
  5. 4
      src/getattr.cpp
  6. 4
      src/getxattr.cpp
  7. 4
      src/ioctl.cpp
  8. 10
      src/link.cpp
  9. 4
      src/listxattr.cpp
  10. 8
      src/mkdir.cpp
  11. 8
      src/mknod.cpp
  12. 4
      src/open.cpp
  13. 81
      src/policy.hpp
  14. 3
      src/policy_all.cpp
  15. 3
      src/policy_epmfs.cpp
  16. 3
      src/policy_ff.cpp
  17. 3
      src/policy_ffwp.cpp
  18. 5
      src/policy_fwfs.cpp
  19. 3
      src/policy_invalid.cpp
  20. 5
      src/policy_lfs.cpp
  21. 3
      src/policy_mfs.cpp
  22. 3
      src/policy_newest.cpp
  23. 5
      src/policy_rand.cpp
  24. 4
      src/readlink.cpp
  25. 4
      src/removexattr.cpp
  26. 10
      src/rename.cpp
  27. 4
      src/rmdir.cpp
  28. 4
      src/setxattr.cpp
  29. 4
      src/symlink.cpp
  30. 4
      src/truncate.cpp
  31. 4
      src/unlink.cpp
  32. 4
      src/utimens.cpp

5
src/access.cpp

@ -42,10 +42,11 @@
using std::string; using std::string;
using std::vector; using std::vector;
using mergerfs::Policy; using mergerfs::Policy;
using mergerfs::Category;
static static
int int
_access(const Policy::Func::Ptr searchFunc,
_access(Policy::Func::Search searchFunc,
const vector<string> &srcmounts, const vector<string> &srcmounts,
const size_t minfreespace, const size_t minfreespace,
const string &fusepath, const string &fusepath,
@ -76,7 +77,7 @@ namespace mergerfs
const ugid::SetResetGuard ugid(fc->uid,fc->gid); const ugid::SetResetGuard ugid(fc->uid,fc->gid);
const rwlock::ReadGuard readlock(&config.srcmountslock); const rwlock::ReadGuard readlock(&config.srcmountslock);
return _access(*config.access,
return _access(config.access,
config.srcmounts, config.srcmounts,
config.minfreespace, config.minfreespace,
fusepath, fusepath,

4
src/chmod.cpp

@ -39,7 +39,7 @@ using mergerfs::Policy;
static static
int int
_chmod(const Policy::Func::Ptr actionFunc,
_chmod(Policy::Func::Action actionFunc,
const vector<string> &srcmounts, const vector<string> &srcmounts,
const size_t minfreespace, const size_t minfreespace,
const string &fusepath, const string &fusepath,
@ -78,7 +78,7 @@ namespace mergerfs
const ugid::SetResetGuard ugid(fc->uid,fc->gid); const ugid::SetResetGuard ugid(fc->uid,fc->gid);
const rwlock::ReadGuard readlock(&config.srcmountslock); const rwlock::ReadGuard readlock(&config.srcmountslock);
return _chmod(*config.chmod,
return _chmod(config.chmod,
config.srcmounts, config.srcmounts,
config.minfreespace, config.minfreespace,
fusepath, fusepath,

4
src/chown.cpp

@ -40,7 +40,7 @@ using mergerfs::Policy;
static static
int int
_chown(const Policy::Func::Ptr actionFunc,
_chown(Policy::Func::Action actionFunc,
const vector<string> &srcmounts, const vector<string> &srcmounts,
const size_t minfreespace, const size_t minfreespace,
const string &fusepath, const string &fusepath,
@ -81,7 +81,7 @@ namespace mergerfs
const ugid::SetResetGuard ugid(fc->uid,fc->gid); const ugid::SetResetGuard ugid(fc->uid,fc->gid);
const rwlock::ReadGuard readlock(&config.srcmountslock); const rwlock::ReadGuard readlock(&config.srcmountslock);
return _chown(*config.chown,
return _chown(config.chown,
config.srcmounts, config.srcmounts,
config.minfreespace, config.minfreespace,
fusepath, fusepath,

8
src/create.cpp

@ -43,8 +43,8 @@ using mergerfs::Policy;
static static
int int
_create(const Policy::Func::Ptr searchFunc,
const Policy::Func::Ptr createFunc,
_create(Policy::Func::Search searchFunc,
Policy::Func::Create createFunc,
const vector<string> &srcmounts, const vector<string> &srcmounts,
const size_t minfreespace, const size_t minfreespace,
const string &fusepath, const string &fusepath,
@ -99,8 +99,8 @@ namespace mergerfs
const ugid::SetResetGuard ugid(fc->uid,fc->gid); const ugid::SetResetGuard ugid(fc->uid,fc->gid);
const rwlock::ReadGuard readlock(&config.srcmountslock); const rwlock::ReadGuard readlock(&config.srcmountslock);
return _create(*config.getattr,
*config.create,
return _create(config.getattr,
config.create,
config.srcmounts, config.srcmounts,
config.minfreespace, config.minfreespace,
fusepath, fusepath,

4
src/getattr.cpp

@ -66,7 +66,7 @@ _getattr_controlfile(struct stat &buf)
static static
int int
_getattr(const Policy::Func::Ptr searchFunc,
_getattr(Policy::Func::Search searchFunc,
const vector<string> &srcmounts, const vector<string> &srcmounts,
const size_t minfreespace, const size_t minfreespace,
const string &fusepath, const string &fusepath,
@ -101,7 +101,7 @@ namespace mergerfs
const ugid::SetResetGuard ugid(fc->uid,fc->gid); const ugid::SetResetGuard ugid(fc->uid,fc->gid);
const rwlock::ReadGuard readlock(&config.srcmountslock); const rwlock::ReadGuard readlock(&config.srcmountslock);
return _getattr(*config.getattr,
return _getattr(config.getattr,
config.srcmounts, config.srcmounts,
config.minfreespace, config.minfreespace,
fusepath, fusepath,

4
src/getxattr.cpp

@ -190,7 +190,7 @@ _getxattr_user_mergerfs(const Path &path,
static static
int int
_getxattr(const Policy::Func::Ptr searchFunc,
_getxattr(Policy::Func::Search searchFunc,
const vector<string> &srcmounts, const vector<string> &srcmounts,
const size_t minfreespace, const size_t minfreespace,
const string &fusepath, const string &fusepath,
@ -239,7 +239,7 @@ namespace mergerfs
const ugid::SetResetGuard ugid(fc->uid,fc->gid); const ugid::SetResetGuard ugid(fc->uid,fc->gid);
const rwlock::ReadGuard readlock(&config.srcmountslock); const rwlock::ReadGuard readlock(&config.srcmountslock);
return _getxattr(*config.getxattr,
return _getxattr(config.getxattr,
config.srcmounts, config.srcmounts,
config.minfreespace, config.minfreespace,
fusepath, fusepath,

4
src/ioctl.cpp

@ -82,7 +82,7 @@ _ioctl(const int fd,
#ifdef FUSE_IOCTL_DIR #ifdef FUSE_IOCTL_DIR
static static
int int
_ioctl_dir_base(const Policy::Func::Ptr searchFunc,
_ioctl_dir_base(Policy::Func::Search searchFunc,
const vector<string> &srcmounts, const vector<string> &srcmounts,
const size_t minfreespace, const size_t minfreespace,
const string &fusepath, const string &fusepath,
@ -123,7 +123,7 @@ _ioctl_dir(const string &fusepath,
const ugid::SetResetGuard ugid(fc->uid,fc->gid); const ugid::SetResetGuard ugid(fc->uid,fc->gid);
const rwlock::ReadGuard readlock(&config.srcmountslock); const rwlock::ReadGuard readlock(&config.srcmountslock);
return _ioctl_dir_base(*config.getattr,
return _ioctl_dir_base(config.getattr,
config.srcmounts, config.srcmounts,
config.minfreespace, config.minfreespace,
fusepath, fusepath,

10
src/link.cpp

@ -41,7 +41,7 @@ using mergerfs::Policy;
static static
int int
_single_link(const Policy::Func::Ptr searchFunc,
_single_link(Policy::Func::Search searchFunc,
const vector<string> &srcmounts, const vector<string> &srcmounts,
const size_t minfreespace, const size_t minfreespace,
const string &base, const string &base,
@ -76,8 +76,8 @@ _single_link(const Policy::Func::Ptr searchFunc,
static static
int int
_link(const Policy::Func::Ptr searchFunc,
const Policy::Func::Ptr actionFunc,
_link(Policy::Func::Search searchFunc,
Policy::Func::Action actionFunc,
const vector<string> &srcmounts, const vector<string> &srcmounts,
const size_t minfreespace, const size_t minfreespace,
const string &oldpath, const string &oldpath,
@ -116,8 +116,8 @@ namespace mergerfs
const ugid::SetResetGuard ugid(fc->uid,fc->gid); const ugid::SetResetGuard ugid(fc->uid,fc->gid);
const rwlock::ReadGuard readlock(&config.srcmountslock); const rwlock::ReadGuard readlock(&config.srcmountslock);
return _link(*config.getattr,
*config.link,
return _link(config.getattr,
config.link,
config.srcmounts, config.srcmounts,
config.minfreespace, config.minfreespace,
from, from,

4
src/listxattr.cpp

@ -69,7 +69,7 @@ _listxattr_controlfile(char *list,
static static
int int
_listxattr(const Policy::Func::Ptr searchFunc,
_listxattr(Policy::Func::Search searchFunc,
const vector<string> &srcmounts, const vector<string> &srcmounts,
const size_t minfreespace, const size_t minfreespace,
const string &fusepath, const string &fusepath,
@ -110,7 +110,7 @@ namespace mergerfs
const ugid::SetResetGuard ugid(fc->uid,fc->gid); const ugid::SetResetGuard ugid(fc->uid,fc->gid);
const rwlock::ReadGuard readlock(&config.srcmountslock); const rwlock::ReadGuard readlock(&config.srcmountslock);
return _listxattr(*config.listxattr,
return _listxattr(config.listxattr,
config.srcmounts, config.srcmounts,
config.minfreespace, config.minfreespace,
fusepath, fusepath,

8
src/mkdir.cpp

@ -42,8 +42,8 @@ using mergerfs::Policy;
static static
int int
_mkdir(const Policy::Func::Ptr searchFunc,
const Policy::Func::Ptr createFunc,
_mkdir(Policy::Func::Search searchFunc,
Policy::Func::Create createFunc,
const vector<string> &srcmounts, const vector<string> &srcmounts,
const size_t minfreespace, const size_t minfreespace,
const string &fusepath, const string &fusepath,
@ -98,8 +98,8 @@ namespace mergerfs
const ugid::SetResetGuard ugid(fc->uid,fc->gid); const ugid::SetResetGuard ugid(fc->uid,fc->gid);
const rwlock::ReadGuard readlock(&config.srcmountslock); const rwlock::ReadGuard readlock(&config.srcmountslock);
return _mkdir(*config.getattr,
*config.mkdir,
return _mkdir(config.getattr,
config.mkdir,
config.srcmounts, config.srcmounts,
config.minfreespace, config.minfreespace,
fusepath, fusepath,

8
src/mknod.cpp

@ -44,8 +44,8 @@ using mergerfs::Policy;
static static
int int
_mknod(const Policy::Func::Ptr searchFunc,
const Policy::Func::Ptr createFunc,
_mknod(Policy::Func::Search searchFunc,
Policy::Func::Create createFunc,
const vector<string> &srcmounts, const vector<string> &srcmounts,
const size_t minfreespace, const size_t minfreespace,
const string &fusepath, const string &fusepath,
@ -102,8 +102,8 @@ namespace mergerfs
const ugid::SetResetGuard ugid(fc->uid,fc->gid); const ugid::SetResetGuard ugid(fc->uid,fc->gid);
const rwlock::ReadGuard readlock(&config.srcmountslock); const rwlock::ReadGuard readlock(&config.srcmountslock);
return _mknod(*config.getattr,
*config.mknod,
return _mknod(config.getattr,
config.mknod,
config.srcmounts, config.srcmounts,
config.minfreespace, config.minfreespace,
fusepath, fusepath,

4
src/open.cpp

@ -42,7 +42,7 @@ using mergerfs::Policy;
static static
int int
_open(const Policy::Func::Ptr searchFunc,
_open(Policy::Func::Search searchFunc,
const vector<string> &srcmounts, const vector<string> &srcmounts,
const size_t minfreespace, const size_t minfreespace,
const string &fusepath, const string &fusepath,
@ -79,7 +79,7 @@ namespace mergerfs
const ugid::SetResetGuard ugid(fc->uid,fc->gid); const ugid::SetResetGuard ugid(fc->uid,fc->gid);
const rwlock::ReadGuard readlock(&config.srcmountslock); const rwlock::ReadGuard readlock(&config.srcmountslock);
return _open(*config.open,
return _open(config.open,
config.srcmounts, config.srcmounts,
config.minfreespace, config.minfreespace,
fusepath, fusepath,

81
src/policy.hpp

@ -31,6 +31,7 @@
#include "path.hpp" #include "path.hpp"
#include "fs.hpp" #include "fs.hpp"
#include "category.hpp"
namespace mergerfs namespace mergerfs
{ {
@ -61,19 +62,74 @@ namespace mergerfs
typedef std::string string; typedef std::string string;
typedef std::size_t size_t; typedef std::size_t size_t;
typedef std::vector<string> strvec; typedef std::vector<string> strvec;
typedef const string cstring;
typedef const size_t csize_t;
typedef const strvec cstrvec;
typedef const Category::Enum::Type CType;
typedef int (*Ptr)(const strvec&,const string&,const size_t,Paths&);
static int invalid(const strvec&,const string&,const size_t,Paths&);
static int all(const strvec&,const string&,const size_t,Paths&);
static int epmfs(const strvec&,const string&,const size_t,Paths&);
static int ff(const strvec&,const string&,const size_t,Paths&);
static int ffwp(const strvec&,const string&,const size_t,Paths&);
static int fwfs(const strvec&,const string&,const size_t,Paths&);
static int lfs(const strvec&,const string&,const size_t,Paths&);
static int mfs(const strvec&,const string&,const size_t,Paths&);
static int newest(const strvec&,const string&,const size_t,Paths&);
static int rand(const strvec&,const string&,const size_t,Paths&);
typedef int (*Ptr)(CType,cstrvec&,cstring&,csize_t,Paths&);
class Action
{
public:
Action(const Policy *p)
: func(p->_func)
{}
int
operator()(cstrvec& b,cstring& c,csize_t d,Paths& e)
{
return func(Category::Enum::action,b,c,d,e);
}
private:
const Ptr func;
};
class Create
{
public:
Create(const Policy *p)
: func(p->_func)
{}
int
operator()(cstrvec& b,cstring& c,csize_t d,Paths& e)
{
return func(Category::Enum::create,b,c,d,e);
}
private:
const Ptr func;
};
class Search
{
public:
Search(const Policy *p)
: func(p->_func)
{}
int
operator()(cstrvec& b,cstring& c,csize_t d,Paths& e)
{
return func(Category::Enum::search,b,c,d,e);
}
private:
const Ptr func;
};
static int invalid(CType,cstrvec&,cstring&,csize_t,Paths&);
static int all(CType,cstrvec&,cstring&,csize_t,Paths&);
static int epmfs(CType,cstrvec&,cstring&,csize_t,Paths&);
static int ff(CType,cstrvec&,cstring&,csize_t,Paths&);
static int ffwp(CType,cstrvec&,cstring&,csize_t,Paths&);
static int fwfs(CType,cstrvec&,cstring&,csize_t,Paths&);
static int lfs(CType,cstrvec&,cstring&,csize_t,Paths&);
static int mfs(CType,cstrvec&,cstring&,csize_t,Paths&);
static int newest(CType,cstrvec&,cstring&,csize_t,Paths&);
static int rand(CType,cstrvec&,cstring&,csize_t,Paths&);
}; };
private: private:
@ -124,6 +180,7 @@ namespace mergerfs
public: public:
static const std::vector<Policy> _policies_; static const std::vector<Policy> _policies_;
static const Policy * const policies; static const Policy * const policies;
static const Policy &invalid; static const Policy &invalid;
static const Policy &all; static const Policy &all;
static const Policy &epmfs; static const Policy &epmfs;

3
src/policy_all.cpp

@ -39,7 +39,8 @@ using std::size_t;
namespace mergerfs namespace mergerfs
{ {
int int
Policy::Func::all(const vector<string> &basepaths,
Policy::Func::all(const Category::Enum::Type type,
const vector<string> &basepaths,
const string &fusepath, const string &fusepath,
const size_t minfreespace, const size_t minfreespace,
Paths &paths) Paths &paths)

3
src/policy_epmfs.cpp

@ -40,7 +40,8 @@ using std::size_t;
namespace mergerfs namespace mergerfs
{ {
int int
Policy::Func::epmfs(const vector<string> &basepaths,
Policy::Func::epmfs(const Category::Enum::Type type,
const vector<string> &basepaths,
const string &fusepath, const string &fusepath,
const size_t minfreespace, const size_t minfreespace,
Paths &paths) Paths &paths)

3
src/policy_ff.cpp

@ -40,7 +40,8 @@ using std::size_t;
namespace mergerfs namespace mergerfs
{ {
int int
Policy::Func::ff(const vector<string> &basepaths,
Policy::Func::ff(const Category::Enum::Type type,
const vector<string> &basepaths,
const string &fusepath, const string &fusepath,
const size_t minfreespace, const size_t minfreespace,
Paths &paths) Paths &paths)

3
src/policy_ffwp.cpp

@ -39,7 +39,8 @@ using std::size_t;
namespace mergerfs namespace mergerfs
{ {
int int
Policy::Func::ffwp(const vector<string> &basepaths,
Policy::Func::ffwp(const Category::Enum::Type type,
const vector<string> &basepaths,
const string &fusepath, const string &fusepath,
const size_t minfreespace, const size_t minfreespace,
Paths &paths) Paths &paths)

5
src/policy_fwfs.cpp

@ -37,7 +37,8 @@ using std::size_t;
namespace mergerfs namespace mergerfs
{ {
int int
Policy::Func::fwfs(const vector<string> &basepaths,
Policy::Func::fwfs(const Category::Enum::Type type,
const vector<string> &basepaths,
const string &fusepath, const string &fusepath,
const size_t minfreespace, const size_t minfreespace,
Paths &paths) Paths &paths)
@ -64,6 +65,6 @@ namespace mergerfs
} }
} }
return mfs(basepaths,fusepath,minfreespace,paths);
return mfs(type,basepaths,fusepath,minfreespace,paths);
} }
} }

3
src/policy_invalid.cpp

@ -36,7 +36,8 @@ using std::size_t;
namespace mergerfs namespace mergerfs
{ {
int int
Policy::Func::invalid(const vector<string> &basepaths,
Policy::Func::invalid(const Category::Enum::Type type,
const vector<string> &basepaths,
const string &fusepath, const string &fusepath,
const size_t minfreespace, const size_t minfreespace,
Paths &rv) Paths &rv)

5
src/policy_lfs.cpp

@ -40,7 +40,8 @@ using std::size_t;
namespace mergerfs namespace mergerfs
{ {
int int
Policy::Func::lfs(const vector<string> &basepaths,
Policy::Func::lfs(const Category::Enum::Type type,
const vector<string> &basepaths,
const string &fusepath, const string &fusepath,
const size_t minfreespace, const size_t minfreespace,
Paths &paths) Paths &paths)
@ -73,7 +74,7 @@ namespace mergerfs
} }
if(lfsstr == NULL) if(lfsstr == NULL)
return Policy::Func::mfs(basepaths,fusepath,minfreespace,paths);
return mfs(type,basepaths,fusepath,minfreespace,paths);
paths.push_back(Path(lfsstr, paths.push_back(Path(lfsstr,
fs::make_path(lfsstr,fusepath))); fs::make_path(lfsstr,fusepath)));

3
src/policy_mfs.cpp

@ -37,7 +37,8 @@ using std::size_t;
namespace mergerfs namespace mergerfs
{ {
int int
Policy::Func::mfs(const vector<string> &basepaths,
Policy::Func::mfs(const Category::Enum::Type type,
const vector<string> &basepaths,
const string &fusepath, const string &fusepath,
const size_t minfreespace, const size_t minfreespace,
Paths &paths) Paths &paths)

3
src/policy_newest.cpp

@ -39,7 +39,8 @@ using std::size_t;
namespace mergerfs namespace mergerfs
{ {
int int
Policy::Func::newest(const vector<string> &basepaths,
Policy::Func::newest(const Category::Enum::Type type,
const vector<string> &basepaths,
const string &fusepath, const string &fusepath,
const size_t minfreespace, const size_t minfreespace,
Paths &paths) Paths &paths)

5
src/policy_rand.cpp

@ -37,14 +37,15 @@ using std::size_t;
namespace mergerfs namespace mergerfs
{ {
int int
Policy::Func::rand(const vector<string> &basepaths,
Policy::Func::rand(const Category::Enum::Type type,
const vector<string> &basepaths,
const string &fusepath, const string &fusepath,
const size_t minfreespace, const size_t minfreespace,
Paths &paths) Paths &paths)
{ {
int rv; int rv;
rv = Policy::Func::all(basepaths,fusepath,minfreespace,paths);
rv = Policy::Func::all(type,basepaths,fusepath,minfreespace,paths);
if(rv == -1) if(rv == -1)
return -1; return -1;

4
src/readlink.cpp

@ -41,7 +41,7 @@ using mergerfs::Policy;
static static
int int
_readlink(const Policy::Func::Ptr searchFunc,
_readlink(Policy::Func::Search searchFunc,
const vector<string> &srcmounts, const vector<string> &srcmounts,
const size_t minfreespace, const size_t minfreespace,
const string &fusepath, const string &fusepath,
@ -78,7 +78,7 @@ namespace mergerfs
const ugid::SetResetGuard ugid(fc->uid,fc->gid); const ugid::SetResetGuard ugid(fc->uid,fc->gid);
const rwlock::ReadGuard readlock(&config.srcmountslock); const rwlock::ReadGuard readlock(&config.srcmountslock);
return _readlink(*config.readlink,
return _readlink(config.readlink,
config.srcmounts, config.srcmounts,
config.minfreespace, config.minfreespace,
fusepath, fusepath,

4
src/removexattr.cpp

@ -42,7 +42,7 @@ using mergerfs::Policy;
static static
int int
_removexattr(const Policy::Func::Ptr actionFunc,
_removexattr(Policy::Func::Action actionFunc,
const vector<string> &srcmounts, const vector<string> &srcmounts,
const size_t minfreespace, const size_t minfreespace,
const string &fusepath, const string &fusepath,
@ -89,7 +89,7 @@ namespace mergerfs
const ugid::SetResetGuard ugid(fc->uid,fc->gid); const ugid::SetResetGuard ugid(fc->uid,fc->gid);
const rwlock::ReadGuard readlock(&config.srcmountslock); const rwlock::ReadGuard readlock(&config.srcmountslock);
return _removexattr(*config.removexattr,
return _removexattr(config.removexattr,
config.srcmounts, config.srcmounts,
config.minfreespace, config.minfreespace,
fusepath, fusepath,

10
src/rename.cpp

@ -42,7 +42,7 @@ using mergerfs::Policy;
static static
int int
_single_rename(const Policy::Func::Ptr searchFunc,
_single_rename(Policy::Func::Search searchFunc,
const vector<string> &srcmounts, const vector<string> &srcmounts,
const size_t minfreespace, const size_t minfreespace,
const Path &oldpath, const Path &oldpath,
@ -75,8 +75,8 @@ _single_rename(const Policy::Func::Ptr searchFunc,
static static
int int
_rename(const Policy::Func::Ptr searchFunc,
const Policy::Func::Ptr actionFunc,
_rename(Policy::Func::Search searchFunc,
Policy::Func::Action actionFunc,
const vector<string> &srcmounts, const vector<string> &srcmounts,
const size_t minfreespace, const size_t minfreespace,
const string &oldpath, const string &oldpath,
@ -115,8 +115,8 @@ namespace mergerfs
const ugid::SetResetGuard ugid(fc->uid,fc->gid); const ugid::SetResetGuard ugid(fc->uid,fc->gid);
const rwlock::ReadGuard readlock(&config.srcmountslock); const rwlock::ReadGuard readlock(&config.srcmountslock);
return _rename(*config.getattr,
*config.rename,
return _rename(config.getattr,
config.rename,
config.srcmounts, config.srcmounts,
config.minfreespace, config.minfreespace,
oldpath, oldpath,

4
src/rmdir.cpp

@ -40,7 +40,7 @@ using mergerfs::Policy;
static static
int int
_rmdir(const Policy::Func::Ptr actionFunc,
_rmdir(Policy::Func::Action actionFunc,
const vector<string> &srcmounts, const vector<string> &srcmounts,
const size_t minfreespace, const size_t minfreespace,
const string &fusepath) const string &fusepath)
@ -77,7 +77,7 @@ namespace mergerfs
const ugid::SetResetGuard ugid(fc->uid,fc->gid); const ugid::SetResetGuard ugid(fc->uid,fc->gid);
const rwlock::ReadGuard readguard(&config.srcmountslock); const rwlock::ReadGuard readguard(&config.srcmountslock);
return _rmdir(*config.rmdir,
return _rmdir(config.rmdir,
config.srcmounts, config.srcmounts,
config.minfreespace, config.minfreespace,
fusepath); fusepath);

4
src/setxattr.cpp

@ -240,7 +240,7 @@ _setxattr_controlfile(config::Config &config,
static static
int int
_setxattr(const Policy::Func::Ptr actionFunc,
_setxattr(Policy::Func::Action actionFunc,
const vector<string> &srcmounts, const vector<string> &srcmounts,
const size_t minfreespace, const size_t minfreespace,
const string &fusepath, const string &fusepath,
@ -301,7 +301,7 @@ namespace mergerfs
const ugid::SetResetGuard ugid(fc->uid,fc->gid); const ugid::SetResetGuard ugid(fc->uid,fc->gid);
const rwlock::ReadGuard readlock(&config.srcmountslock); const rwlock::ReadGuard readlock(&config.srcmountslock);
return _setxattr(*config.setxattr,
return _setxattr(config.setxattr,
config.srcmounts, config.srcmounts,
config.minfreespace, config.minfreespace,
fusepath, fusepath,

4
src/symlink.cpp

@ -40,7 +40,7 @@ using mergerfs::Policy;
static static
int int
_symlink(const Policy::Func::Ptr createFunc,
_symlink(Policy::Func::Create createFunc,
const vector<string> &srcmounts, const vector<string> &srcmounts,
const size_t minfreespace, const size_t minfreespace,
const string &oldpath, const string &oldpath,
@ -83,7 +83,7 @@ namespace mergerfs
const ugid::SetResetGuard ugid(fc->uid,fc->gid); const ugid::SetResetGuard ugid(fc->uid,fc->gid);
const rwlock::ReadGuard readlock(&config.srcmountslock); const rwlock::ReadGuard readlock(&config.srcmountslock);
return _symlink(*config.symlink,
return _symlink(config.symlink,
config.srcmounts, config.srcmounts,
config.minfreespace, config.minfreespace,
oldpath, oldpath,

4
src/truncate.cpp

@ -42,7 +42,7 @@ using mergerfs::Policy;
static static
int int
_truncate(const Policy::Func::Ptr actionFunc,
_truncate(Policy::Func::Action actionFunc,
const vector<string> &srcmounts, const vector<string> &srcmounts,
const size_t minfreespace, const size_t minfreespace,
const string &fusepath, const string &fusepath,
@ -81,7 +81,7 @@ namespace mergerfs
const ugid::SetResetGuard ugid(fc->uid,fc->gid); const ugid::SetResetGuard ugid(fc->uid,fc->gid);
const rwlock::ReadGuard readlock(&config.srcmountslock); const rwlock::ReadGuard readlock(&config.srcmountslock);
return _truncate(*config.truncate,
return _truncate(config.truncate,
config.srcmounts, config.srcmounts,
config.minfreespace, config.minfreespace,
fusepath, fusepath,

4
src/unlink.cpp

@ -41,7 +41,7 @@ using mergerfs::Policy;
static static
int int
_unlink(const Policy::Func::Ptr actionFunc,
_unlink(Policy::Func::Action actionFunc,
const vector<string> &srcmounts, const vector<string> &srcmounts,
const size_t minfreespace, const size_t minfreespace,
const string &fusepath) const string &fusepath)
@ -78,7 +78,7 @@ namespace mergerfs
const ugid::SetResetGuard ugid(fc->uid,fc->gid); const ugid::SetResetGuard ugid(fc->uid,fc->gid);
const rwlock::ReadGuard readlock(&config.srcmountslock); const rwlock::ReadGuard readlock(&config.srcmountslock);
return _unlink(*config.unlink,
return _unlink(config.unlink,
config.srcmounts, config.srcmounts,
config.minfreespace, config.minfreespace,
fusepath); fusepath);

4
src/utimens.cpp

@ -42,7 +42,7 @@ using mergerfs::Policy;
static static
int int
_utimens(const Policy::Func::Ptr actionFunc,
_utimens(Policy::Func::Action actionFunc,
const vector<string> &srcmounts, const vector<string> &srcmounts,
const size_t minfreespace, const size_t minfreespace,
const string &fusepath, const string &fusepath,
@ -81,7 +81,7 @@ namespace mergerfs
const ugid::SetResetGuard ugid(fc->uid,fc->gid); const ugid::SetResetGuard ugid(fc->uid,fc->gid);
const rwlock::ReadGuard readlock(&config.srcmountslock); const rwlock::ReadGuard readlock(&config.srcmountslock);
return _utimens(*config.utimens,
return _utimens(config.utimens,
config.srcmounts, config.srcmounts,
config.minfreespace, config.minfreespace,
fusepath, fusepath,

Loading…
Cancel
Save