add policy cache for 'open'

A fusepath -> basepath cache for `open` to limit the overhead of FUSE in 'open, read/write, close' patterns (such as Transmission).
This commit is contained in:
Antonio SJ Musumeci 2019-01-06 12:52:55 -05:00
parent 8e0aa1d9a6
commit 7a057daa0c
44 changed files with 858 additions and 649 deletions

View file

@ -28,7 +28,6 @@
using std::string;
using std::vector;
using mergerfs::Category;
namespace eplus
{
@ -162,24 +161,21 @@ namespace eplus
}
}
namespace mergerfs
int
Policy::Func::eplus(const Category::Enum::Type type,
const Branches &branches_,
const char *fusepath,
const uint64_t minfreespace,
vector<const string*> &paths)
{
int
Policy::Func::eplus(const Category::Enum::Type type,
const Branches &branches_,
const char *fusepath,
const uint64_t minfreespace,
vector<const string*> &paths)
{
switch(type)
{
case Category::Enum::create:
return eplus::create(branches_,fusepath,minfreespace,paths);
case Category::Enum::action:
return eplus::action(branches_,fusepath,paths);
case Category::Enum::search:
default:
return eplus::search(branches_,fusepath,paths);
}
}
switch(type)
{
case Category::Enum::create:
return eplus::create(branches_,fusepath,minfreespace,paths);
case Category::Enum::action:
return eplus::action(branches_,fusepath,paths);
case Category::Enum::search:
default:
return eplus::search(branches_,fusepath,paths);
}
}