mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
create minfreespace option. closes #71
This commit is contained in:
parent
ad7ce487bb
commit
ccb22c1fbe
26 changed files with 171 additions and 84 deletions
|
|
@ -46,6 +46,7 @@ int
|
|||
_create(const fs::find::Func searchFunc,
|
||||
const fs::find::Func createFunc,
|
||||
const vector<string> &srcmounts,
|
||||
const size_t minfreespace,
|
||||
const string &fusepath,
|
||||
const mode_t mode,
|
||||
const int flags,
|
||||
|
|
@ -59,11 +60,11 @@ _create(const fs::find::Func searchFunc,
|
|||
fs::Paths existingpath;
|
||||
|
||||
dirname = fs::dirname(fusepath);
|
||||
rv = searchFunc(srcmounts,dirname,existingpath,1);
|
||||
rv = searchFunc(srcmounts,dirname,minfreespace,existingpath);
|
||||
if(rv == -1)
|
||||
return -errno;
|
||||
|
||||
rv = createFunc(srcmounts,dirname,createpath,1);
|
||||
rv = createFunc(srcmounts,dirname,minfreespace,createpath);
|
||||
if(rv == -1)
|
||||
return -errno;
|
||||
|
||||
|
|
@ -101,6 +102,7 @@ namespace mergerfs
|
|||
return _create(*config.getattr,
|
||||
*config.create,
|
||||
config.srcmounts,
|
||||
config.minfreespace,
|
||||
fusepath,
|
||||
(mode & ~fc->umask),
|
||||
fileinfo->flags,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue