mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
Auto-commit fuse.cpp
This commit is contained in:
parent
d5a2187713
commit
02da8efbff
37 changed files with 374 additions and 267 deletions
|
|
@ -34,7 +34,7 @@
|
|||
#include <fnmatch.h>
|
||||
|
||||
|
||||
Branches::Impl::Impl(const u64 &default_minfreespace_)
|
||||
Branches::Impl::Impl(u64 default_minfreespace_)
|
||||
: _default_minfreespace(default_minfreespace_)
|
||||
{
|
||||
}
|
||||
|
|
@ -48,6 +48,12 @@ Branches::Impl::operator=(Branches::Impl &rval_)
|
|||
|
||||
*this_base = *rval_base;
|
||||
|
||||
for(auto &branch : *this)
|
||||
{
|
||||
if(std::holds_alternative<const u64*>(branch._minfreespace))
|
||||
branch._minfreespace = &_default_minfreespace;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
@ -60,6 +66,12 @@ Branches::Impl::operator=(Branches::Impl &&rval_)
|
|||
|
||||
*this_base = std::move(*rval_base);
|
||||
|
||||
for(auto &branch : *this)
|
||||
{
|
||||
if(std::holds_alternative<const u64*>(branch._minfreespace))
|
||||
branch._minfreespace = &_default_minfreespace;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
@ -148,7 +160,7 @@ namespace l
|
|||
case 2:
|
||||
*glob_ = v[0];
|
||||
options = v[1];
|
||||
v = str::split(options,',');
|
||||
v = str::split(options,',');
|
||||
switch(v.size())
|
||||
{
|
||||
case 2:
|
||||
|
|
@ -440,7 +452,9 @@ Branches::to_string(void) const
|
|||
void
|
||||
Branches::find_and_set_mode_ro()
|
||||
{
|
||||
for(auto &branch : *_impl)
|
||||
auto impl = std::atomic_load(&_impl);
|
||||
|
||||
for(auto &branch : *impl)
|
||||
{
|
||||
if(branch.mode != Branch::Mode::RW)
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue