|
@ -63,10 +63,13 @@ namespace l |
|
|
IFERT("mount"); |
|
|
IFERT("mount"); |
|
|
IFERT("nullrw"); |
|
|
IFERT("nullrw"); |
|
|
IFERT("pid"); |
|
|
IFERT("pid"); |
|
|
|
|
|
IFERT("pin-threads"); |
|
|
|
|
|
IFERT("process-thread-count"); |
|
|
|
|
|
IFERT("read-thread-count"); |
|
|
IFERT("readdirplus"); |
|
|
IFERT("readdirplus"); |
|
|
|
|
|
IFERT("scheduling-priority"); |
|
|
IFERT("threads"); |
|
|
IFERT("threads"); |
|
|
IFERT("version"); |
|
|
IFERT("version"); |
|
|
IFERT("scheduling-priority"); |
|
|
|
|
|
|
|
|
|
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
@ -118,9 +121,11 @@ Config::Config() |
|
|
symlinkify_timeout(3600), |
|
|
symlinkify_timeout(3600), |
|
|
fuse_read_thread_count(-1), |
|
|
fuse_read_thread_count(-1), |
|
|
fuse_process_thread_count(-1), |
|
|
fuse_process_thread_count(-1), |
|
|
|
|
|
fuse_pin_threads("false"), |
|
|
version(MERGERFS_VERSION), |
|
|
version(MERGERFS_VERSION), |
|
|
writeback_cache(false), |
|
|
writeback_cache(false), |
|
|
xattr(XAttr::ENUM::PASSTHROUGH) |
|
|
|
|
|
|
|
|
xattr(XAttr::ENUM::PASSTHROUGH), |
|
|
|
|
|
_initialized(false) |
|
|
{ |
|
|
{ |
|
|
_map["async_read"] = &async_read; |
|
|
_map["async_read"] = &async_read; |
|
|
_map["auto_cache"] = &auto_cache; |
|
|
_map["auto_cache"] = &auto_cache; |
|
@ -176,6 +181,7 @@ Config::Config() |
|
|
_map["nfsopenhack"] = &nfsopenhack; |
|
|
_map["nfsopenhack"] = &nfsopenhack; |
|
|
_map["nullrw"] = &nullrw; |
|
|
_map["nullrw"] = &nullrw; |
|
|
_map["pid"] = &pid; |
|
|
_map["pid"] = &pid; |
|
|
|
|
|
_map["pin-threads"] = &fuse_pin_threads; |
|
|
_map["posix_acl"] = &posix_acl; |
|
|
_map["posix_acl"] = &posix_acl; |
|
|
_map["readahead"] = &readahead; |
|
|
_map["readahead"] = &readahead; |
|
|
// _map["readdir"] = &readdir;
|
|
|
// _map["readdir"] = &readdir;
|
|
@ -287,7 +293,7 @@ int |
|
|
Config::set(const std::string &key_, |
|
|
Config::set(const std::string &key_, |
|
|
const std::string &value_) |
|
|
const std::string &value_) |
|
|
{ |
|
|
{ |
|
|
if(l::readonly(key_)) |
|
|
|
|
|
|
|
|
if(_initialized && l::readonly(key_)) |
|
|
return -EROFS; |
|
|
return -EROFS; |
|
|
|
|
|
|
|
|
return set_raw(key_,value_); |
|
|
return set_raw(key_,value_); |
|
@ -362,6 +368,12 @@ Config::from_file(const std::string &filepath_, |
|
|
return rv; |
|
|
return rv; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
|
Config::finish_initializing() |
|
|
|
|
|
{ |
|
|
|
|
|
_initialized = true; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
std::ostream& |
|
|
std::ostream& |
|
|
operator<<(std::ostream &os_, |
|
|
operator<<(std::ostream &os_, |
|
|
const Config &c_) |
|
|
const Config &c_) |
|
|