Browse Source

fuse_getattr.cpp

getattr-cache
Antonio SJ Musumeci 10 months ago
parent
commit
6c718f3ed9
  1. 8
      src/fuse_getattr.cpp

8
src/fuse_getattr.cpp

@ -139,13 +139,17 @@ namespace l
int rv; int rv;
std::string fullpath; std::string fullpath;
StrVec basepaths; StrVec basepaths;
const char *basepath;
static PolicyCache cache(1024*1024); static PolicyCache cache(1024*1024);
basepath = cache.find(fusepath_); basepath = cache.find(fusepath_);
while(true)
if(basepath == NULL)
{ {
rv = searchFunc_(branches_,fusepath_,&basepaths);
if(rv == -1)
return -errno;
basepath = cache.insert(fusepath_,basepaths[0]);
} }

Loading…
Cancel
Save