mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-12-03 05:10:14 -05:00
add readdir caching
This commit is contained in:
parent
bac4b33ef8
commit
2323c16316
11 changed files with 87 additions and 52 deletions
|
|
@ -14,6 +14,7 @@
|
|||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "config.hpp"
|
||||
#include "dirinfo.hpp"
|
||||
|
||||
#include <fuse.h>
|
||||
|
|
@ -24,8 +25,16 @@ namespace FUSE
|
|||
opendir(const char *fusepath_,
|
||||
fuse_file_info *ffi_)
|
||||
{
|
||||
const Config &config = Config::get();
|
||||
|
||||
ffi_->fh = reinterpret_cast<uint64_t>(new DirInfo(fusepath_));
|
||||
|
||||
if(config.cache_readdir)
|
||||
{
|
||||
ffi_->keep_cache = 1;
|
||||
ffi_->cache_readdir = 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue