mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
add minfreespace checks to policy ff's create and remove fwfs
fwfs is now covered by ff with the minfreespace and readonly checks
This commit is contained in:
parent
ccd3b5d2d0
commit
779143f4b6
9 changed files with 119 additions and 159 deletions
18
src/fs.cpp
18
src/fs.cpp
|
|
@ -70,6 +70,24 @@ namespace fs
|
|||
return exists(path,st);
|
||||
}
|
||||
|
||||
bool
|
||||
exists(const string &path,
|
||||
bool &readonly,
|
||||
size_t &spaceavail)
|
||||
{
|
||||
bool rv;
|
||||
struct statvfs st;
|
||||
|
||||
rv = exists(path,st);
|
||||
if(rv)
|
||||
{
|
||||
readonly = StatVFS::readonly(st);
|
||||
spaceavail = StatVFS::spaceavail(st);
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
bool
|
||||
exists_on_rw_fs(const string &path,
|
||||
struct statvfs &st)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue