mirror of
https://github.com/trapexit/mergerfs.git
synced 2024-11-26 10:13:50 +08:00
branches2.cpp
This commit is contained in:
parent
f2f6efd9af
commit
281c8eef63
|
@ -83,6 +83,8 @@ min-free-space = 123
|
||||||
|
|
||||||
# TIER 0
|
# TIER 0
|
||||||
[[branches.tier]]
|
[[branches.tier]]
|
||||||
|
enabled = true
|
||||||
|
|
||||||
[branches.tier.func.create]
|
[branches.tier.func.create]
|
||||||
policy.default = 'mfs'
|
policy.default = 'mfs'
|
||||||
[[branches.tier.func.create.policy.overrides]]
|
[[branches.tier.func.create.policy.overrides]]
|
||||||
|
@ -115,10 +117,11 @@ type = 'glob'
|
||||||
mode = 'RW'
|
mode = 'RW'
|
||||||
if-not-mountpoint = 'fail' # 'fail' | 'deactivate' ?
|
if-not-mountpoint = 'fail' # 'fail' | 'deactivate' ?
|
||||||
|
|
||||||
|
|
||||||
# TIER 1
|
# TIER 1
|
||||||
[[branches.tier]]
|
[[branches.tier]]
|
||||||
[[branches.tier.branch]]
|
[[branches.tier.branch]]
|
||||||
enabled = true
|
enabled = false
|
||||||
name = 'branch0'
|
name = 'branch0'
|
||||||
type = 'literal'
|
type = 'literal'
|
||||||
path = '/mnt/*'
|
path = '/mnt/*'
|
||||||
|
|
|
@ -19,6 +19,12 @@ Branches2::Branches2(toml::value const &v_)
|
||||||
|
|
||||||
for(auto const &tier : tiers.as_array())
|
for(auto const &tier : tiers.as_array())
|
||||||
{
|
{
|
||||||
|
bool enabled;
|
||||||
|
|
||||||
|
enabled = toml::find_or(tier,"enabled",false);
|
||||||
|
if(!enabled)
|
||||||
|
continue;
|
||||||
|
|
||||||
_branches.emplace_back(tier);
|
_branches.emplace_back(tier);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user