mirror of
https://github.com/trapexit/mergerfs.git
synced 2024-04-21 12:31:43 +00:00
create lus (least used space) policy. closes #273
This commit is contained in:
+17
-1
@@ -73,7 +73,8 @@ namespace fs
|
||||
bool
|
||||
info(const string &path,
|
||||
bool &readonly,
|
||||
size_t &spaceavail)
|
||||
size_t &spaceavail,
|
||||
size_t &spaceused)
|
||||
{
|
||||
bool rv;
|
||||
struct statvfs st;
|
||||
@@ -83,6 +84,7 @@ namespace fs
|
||||
{
|
||||
readonly = StatVFS::readonly(st);
|
||||
spaceavail = StatVFS::spaceavail(st);
|
||||
spaceused = StatVFS::spaceused(st);
|
||||
}
|
||||
|
||||
return rv;
|
||||
@@ -113,6 +115,20 @@ namespace fs
|
||||
return rv;
|
||||
}
|
||||
|
||||
bool
|
||||
spaceused(const string &path,
|
||||
size_t &spaceused)
|
||||
{
|
||||
bool rv;
|
||||
struct statvfs st;
|
||||
|
||||
rv = fs::statvfs(path,st);
|
||||
if(rv)
|
||||
spaceused = StatVFS::spaceused(st);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
void
|
||||
findallfiles(const vector<string> &srcmounts,
|
||||
const char *fusepath,
|
||||
|
||||
Reference in New Issue
Block a user