|
@ -120,13 +120,13 @@ parse_and_process_minfreespace(const std::string &value, |
|
|
|
|
|
|
|
|
static |
|
|
static |
|
|
int |
|
|
int |
|
|
parse_and_process_moveonenospc(const std::string &value, |
|
|
|
|
|
bool &moveonenospc) |
|
|
|
|
|
|
|
|
parse_and_process_boolean(const std::string &value, |
|
|
|
|
|
bool &boolean) |
|
|
{ |
|
|
{ |
|
|
if(value == "false") |
|
|
if(value == "false") |
|
|
moveonenospc = false; |
|
|
|
|
|
|
|
|
boolean = false; |
|
|
else if(value == "true") |
|
|
else if(value == "true") |
|
|
moveonenospc = true; |
|
|
|
|
|
|
|
|
boolean = true; |
|
|
else |
|
|
else |
|
|
return 1; |
|
|
return 1; |
|
|
|
|
|
|
|
@ -169,7 +169,9 @@ parse_and_process_kv_arg(Config &config, |
|
|
if(key == "minfreespace") |
|
|
if(key == "minfreespace") |
|
|
rv = parse_and_process_minfreespace(value,config.minfreespace); |
|
|
rv = parse_and_process_minfreespace(value,config.minfreespace); |
|
|
else if(key == "moveonenospc") |
|
|
else if(key == "moveonenospc") |
|
|
rv = parse_and_process_moveonenospc(value,config.moveonenospc); |
|
|
|
|
|
|
|
|
rv = parse_and_process_boolean(value,config.moveonenospc); |
|
|
|
|
|
else if(key == "dropcacheonclose") |
|
|
|
|
|
rv = parse_and_process_boolean(value,config.dropcacheonclose); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if(rv == -1) |
|
|
if(rv == -1) |
|
@ -246,20 +248,25 @@ usage(void) |
|
|
"mergerfs options:\n" |
|
|
"mergerfs options:\n" |
|
|
" <srcpaths> ':' delimited list of directories. Supports\n" |
|
|
" <srcpaths> ':' delimited list of directories. Supports\n" |
|
|
" shell globbing (must be escaped in shell)\n" |
|
|
" shell globbing (must be escaped in shell)\n" |
|
|
" -o defaults default FUSE options which seem to provide the\n" |
|
|
|
|
|
|
|
|
" -o defaults Default FUSE options which seem to provide the\n" |
|
|
" best performance: atomic_o_trunc, auto_cache,\n" |
|
|
" best performance: atomic_o_trunc, auto_cache,\n" |
|
|
" big_writes, default_permissions, splice_read,\n" |
|
|
" big_writes, default_permissions, splice_read,\n" |
|
|
" splice_write, splice_move\n" |
|
|
" splice_write, splice_move\n" |
|
|
" -o direct_io bypass additional caching, increases write\n" |
|
|
|
|
|
" speeds at the cost of reads\n" |
|
|
|
|
|
" -o use_ino mergerfs will generate inode values rather than\n" |
|
|
|
|
|
" autogenerated by libfuse\n" |
|
|
|
|
|
" -o minfreespace=<int> minimum free space needed for certain policies:\n" |
|
|
|
|
|
" default 4G\n" |
|
|
|
|
|
|
|
|
" -o func.<f>=<p> Set function <f> to policy <p>\n" |
|
|
|
|
|
" -o category.<c>=<p> Set functions in category <c> to <p>\n" |
|
|
|
|
|
" -o direct_io Bypass additional caching, increases write\n" |
|
|
|
|
|
" speeds at the cost of reads. Please read docs\n" |
|
|
|
|
|
" for more details as there are tradeoffs.\n" |
|
|
|
|
|
" -o use_ino Have mergerfs generate inode values rather than\n" |
|
|
|
|
|
" autogenerated by libfuse. Suggested.\n" |
|
|
|
|
|
" -o minfreespace=<int> minimum free space needed for certain policies.\n" |
|
|
|
|
|
" default=4G\n" |
|
|
" -o moveonenospc=<bool> try to move file to another drive when ENOSPC\n" |
|
|
" -o moveonenospc=<bool> try to move file to another drive when ENOSPC\n" |
|
|
" on write: default false\n" |
|
|
|
|
|
" -o func.<f>=<p> set function <f> to policy <p>\n" |
|
|
|
|
|
" -o category.<c>=<p> set functions in category <c> to <p>\n" |
|
|
|
|
|
|
|
|
" on write. default=false\n" |
|
|
|
|
|
" -o dropcacheonclose=<bool>\n" |
|
|
|
|
|
" when a file is closed suggest to OS it drop\n" |
|
|
|
|
|
" the file's cache. This is useful when direct_io\n" |
|
|
|
|
|
" is disabled. default=false\n" |
|
|
<< std::endl; |
|
|
<< std::endl; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -267,7 +274,8 @@ static |
|
|
void |
|
|
void |
|
|
version(void) |
|
|
version(void) |
|
|
{ |
|
|
{ |
|
|
std::cout << "mergerfs version: " << MERGERFS_VERSION |
|
|
|
|
|
|
|
|
std::cout << "mergerfs version: " |
|
|
|
|
|
<< MERGERFS_VERSION |
|
|
<< std::endl; |
|
|
<< std::endl; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|