mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
rework config management
* Add standard way to do str2val and val2str conversion * Add support for a config file * Add support for reading and writing settings via ioctl
This commit is contained in:
parent
8d989777f8
commit
54c41c4994
90 changed files with 3292 additions and 2619 deletions
|
|
@ -19,7 +19,6 @@
|
|||
#include "fileinfo.hpp"
|
||||
#include "fs_base_write.hpp"
|
||||
#include "fs_movefile.hpp"
|
||||
#include "rwlock.hpp"
|
||||
#include "ugid.hpp"
|
||||
|
||||
#include <string>
|
||||
|
|
@ -92,14 +91,12 @@ namespace l
|
|||
rv = func_(fi->fd,buf_,count_,offset_);
|
||||
if(l::out_of_space(-rv))
|
||||
{
|
||||
const fuse_context *fc = fuse_get_context();
|
||||
const Config &config = Config::get(fc);
|
||||
const Config &config = Config::ro();
|
||||
|
||||
if(config.moveonenospc)
|
||||
{
|
||||
vector<string> paths;
|
||||
const ugid::Set ugid(0,0);
|
||||
const rwlock::ReadGuard readlock(&config.branches_lock);
|
||||
|
||||
config.branches.to_paths(paths);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue