mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-21 15:36:31 -05:00
create minfreespace option. closes #71
This commit is contained in:
parent
ad7ce487bb
commit
ccb22c1fbe
26 changed files with 171 additions and 84 deletions
|
|
@ -71,6 +71,7 @@ static
|
|||
int
|
||||
_listxattr(const fs::find::Func searchFunc,
|
||||
const vector<string> &srcmounts,
|
||||
const size_t minfreespace,
|
||||
const string &fusepath,
|
||||
char *list,
|
||||
const size_t size)
|
||||
|
|
@ -79,7 +80,7 @@ _listxattr(const fs::find::Func searchFunc,
|
|||
int rv;
|
||||
fs::Paths path;
|
||||
|
||||
rv = searchFunc(srcmounts,fusepath,path,1);
|
||||
rv = searchFunc(srcmounts,fusepath,minfreespace,path);
|
||||
if(rv == -1)
|
||||
return -errno;
|
||||
|
||||
|
|
@ -103,8 +104,7 @@ namespace mergerfs
|
|||
const config::Config &config = config::get();
|
||||
|
||||
if(fusepath == config.controlfile)
|
||||
return _listxattr_controlfile(list,
|
||||
size);
|
||||
return _listxattr_controlfile(list,size);
|
||||
|
||||
const struct fuse_context *fc = fuse_get_context();
|
||||
const ugid::SetResetGuard ugid(fc->uid,fc->gid);
|
||||
|
|
@ -112,6 +112,7 @@ namespace mergerfs
|
|||
|
||||
return _listxattr(*config.listxattr,
|
||||
config.srcmounts,
|
||||
config.minfreespace,
|
||||
fusepath,
|
||||
list,
|
||||
size);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue