mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
add readonly and minfreespace filters to all policy for creates. closes #236
This commit is contained in:
parent
81b9918f6b
commit
14886a27f4
3 changed files with 51 additions and 18 deletions
11
src/fs.cpp
11
src/fs.cpp
|
|
@ -89,6 +89,17 @@ namespace fs
|
|||
return exists_on_rw_fs(path,st);
|
||||
}
|
||||
|
||||
bool
|
||||
exists_on_rw_fs_with_at_least(const string &path,
|
||||
const size_t minfreespace)
|
||||
{
|
||||
struct statvfs st;
|
||||
|
||||
return (exists_on_rw_fs(path,st)
|
||||
&&
|
||||
StatVFS::spaceavail(st) >= minfreespace);
|
||||
}
|
||||
|
||||
void
|
||||
findallfiles(const vector<string> &srcmounts,
|
||||
const char *fusepath,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue