branches: add per branch minfreespace w/ original value as default

example: /mnt/disk0=RW,1G:/mnt/disk1=RW,2G
This commit is contained in:
Antonio SJ Musumeci 2020-08-20 18:47:04 -04:00
parent 98c49b8001
commit fc3453932a
68 changed files with 3005 additions and 813 deletions

View file

@ -24,10 +24,11 @@
#include <string>
namespace fs
namespace l
{
static
int
findonfs(const Branches &branches_,
findonfs(const BranchVec &branches_,
const std::string &fusepath_,
const int fd_,
std::string *basepath_)
@ -37,7 +38,6 @@ namespace fs
struct stat st;
std::string fullpath;
const Branch *branch;
const rwlock::ReadGuard guard(&branches_.lock);
rv = fs::fstat(fd_,&st);
if(rv == -1)
@ -65,3 +65,17 @@ namespace fs
return (errno=ENOENT,-1);
}
}
namespace fs
{
int
findonfs(const Branches &branches_,
const std::string &fusepath_,
const int fd_,
std::string *basepath_)
{
rwlock::ReadGuard guard(branches_.lock);
return l::findonfs(branches_.vec,fusepath_,fd_,basepath_);
}
}