mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-21 23:46:26 -05:00
branch2.cpp
This commit is contained in:
parent
d27ef7bc51
commit
1b57f55403
2 changed files with 10 additions and 0 deletions
|
|
@ -97,6 +97,7 @@ enabled = true
|
|||
name = 'branch1'
|
||||
type = 'literal'
|
||||
path = '/mnt/branch1'
|
||||
mode = 'RW'
|
||||
[[branches.tier.branch]]
|
||||
active = true
|
||||
path = '/mnt/disk*'
|
||||
|
|
@ -107,6 +108,8 @@ if-not-mountpoint = 'fail' # 'fail' | 'deactivate' ?
|
|||
# TIER 1
|
||||
[[branches.tier]]
|
||||
[[branches.tier.branch]]
|
||||
enabled = true
|
||||
name = 'branch0'
|
||||
type = 'literal'
|
||||
path = 'foo'
|
||||
mode = 'RO'
|
||||
|
|
|
|||
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
#include <iostream>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
|
||||
Branch2::Branch2()
|
||||
: mode(Mode::RW)
|
||||
|
|
@ -18,4 +22,7 @@ Branch2::Branch2(toml::value const &v_)
|
|||
mode = Mode::_from_string(toml::find<std::string>(v_,"mode").c_str());
|
||||
min_free_space = 0;
|
||||
path = toml::find<std::string>(v_,"path");
|
||||
|
||||
int const flags = O_DIRECTORY | O_PATH;
|
||||
fd = openat(AT_FDCWD,path.string().c_str(),O_DI
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue