mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-12-01 20:36:37 -05:00
config: rework global config, remove rwlock, make branches RCU like
Also added unit tests. Should have done separately but found a number of bugs.
This commit is contained in:
parent
2e4c6c5fd1
commit
538467b86d
327 changed files with 6691 additions and 3036 deletions
|
|
@ -20,10 +20,11 @@
|
|||
#include "fs_close.hpp"
|
||||
#include "fs_fadvise.hpp"
|
||||
|
||||
#include <fuse.h>
|
||||
#include "fuse.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
namespace l
|
||||
{
|
||||
static
|
||||
|
|
@ -52,12 +53,9 @@ namespace FUSE
|
|||
int
|
||||
release(const fuse_file_info_t *ffi_)
|
||||
{
|
||||
const Config &config = Config::ro();
|
||||
Config::Read cfg;
|
||||
FileInfo *fi = reinterpret_cast<FileInfo*>(ffi_->fh);
|
||||
|
||||
if(config.open_cache.timeout)
|
||||
config.open_cache.cleanup(10);
|
||||
|
||||
return l::release(fi,config.dropcacheonclose);
|
||||
return l::release(fi,cfg->dropcacheonclose);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue