mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
branches: add per branch minfreespace w/ original value as default
example: /mnt/disk0=RW,1G:/mnt/disk1=RW,2G
This commit is contained in:
parent
98c49b8001
commit
fc3453932a
68 changed files with 3005 additions and 813 deletions
|
|
@ -28,6 +28,7 @@
|
|||
#include "fs_readdir.hpp"
|
||||
#include "fs_stat.hpp"
|
||||
#include "hashset.hpp"
|
||||
#include "rwlock.hpp"
|
||||
|
||||
#include <fuse.h>
|
||||
#include <fuse_dirents.h>
|
||||
|
|
@ -57,11 +58,11 @@ namespace l
|
|||
|
||||
static
|
||||
int
|
||||
readdir_plus(const Branches &branches_,
|
||||
const char *dirname_,
|
||||
const uint64_t entry_timeout_,
|
||||
const uint64_t attr_timeout_,
|
||||
fuse_dirents_t *buf_)
|
||||
readdir_plus(const BranchVec &branches_,
|
||||
const char *dirname_,
|
||||
const uint64_t entry_timeout_,
|
||||
const uint64_t attr_timeout_,
|
||||
fuse_dirents_t *buf_)
|
||||
{
|
||||
dev_t dev;
|
||||
HashSet names;
|
||||
|
|
@ -126,6 +127,23 @@ namespace l
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static
|
||||
int
|
||||
readdir_plus(const Branches &branches_,
|
||||
const char *dirname_,
|
||||
const uint64_t entry_timeout_,
|
||||
const uint64_t attr_timeout_,
|
||||
fuse_dirents_t *buf_)
|
||||
{
|
||||
rwlock::ReadGuard guard(branches_.lock);
|
||||
|
||||
return l::readdir_plus(branches_.vec,
|
||||
dirname_,
|
||||
entry_timeout_,
|
||||
attr_timeout_,
|
||||
buf_);
|
||||
}
|
||||
}
|
||||
|
||||
namespace FUSE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue