add 'inodecalc' option to allow selection of inode calculation algo

This commit is contained in:
Antonio SJ Musumeci 2020-06-22 13:03:48 -04:00
parent cb74573fc2
commit b4397f7f2e
14 changed files with 470 additions and 130 deletions

View file

@ -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 :