mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
add 'inodecalc' option to allow selection of inode calculation algo
This commit is contained in:
parent
cb74573fc2
commit
b4397f7f2e
14 changed files with 470 additions and 130 deletions
|
|
@ -26,8 +26,9 @@ namespace l
|
|||
{
|
||||
static
|
||||
int
|
||||
fgetattr(const int fd_,
|
||||
struct stat *st_)
|
||||
fgetattr(const int fd_,
|
||||
const std::string &fusepath_,
|
||||
struct stat *st_)
|
||||
{
|
||||
int rv;
|
||||
|
||||
|
|
@ -35,7 +36,7 @@ namespace l
|
|||
if(rv == -1)
|
||||
return -errno;
|
||||
|
||||
fs::inode::recompute(st_);
|
||||
fs::inode::calc(fusepath_,st_);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -53,7 +54,7 @@ namespace FUSE
|
|||
const Config &config = Config::ro();
|
||||
FileInfo *fi = reinterpret_cast<FileInfo*>(ffi_->fh);
|
||||
|
||||
rv = l::fgetattr(fi->fd,st_);
|
||||
rv = l::fgetattr(fi->fd,fi->fusepath,st_);
|
||||
|
||||
timeout_->entry = ((rv >= 0) ?
|
||||
config.cache_entry :
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue