From d8d35ae462a6dd193bd2a769ed780e788a4bdaff Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Wed, 12 Nov 2014 22:50:40 +0100 Subject: [PATCH] Resolve TODO2 --- src/CryFuse.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/CryFuse.cpp b/src/CryFuse.cpp index ffdf8d3b..7439e4b3 100644 --- a/src/CryFuse.cpp +++ b/src/CryFuse.cpp @@ -19,6 +19,7 @@ CryFuse::CryFuse(CryDevice *device) } int CryFuse::getattr(const path &path, struct stat *stbuf) { + //printf("getattr(%s, _, _)\n", path.c_str()); try { _device->lstat(path, stbuf); return 0; @@ -275,6 +276,9 @@ int CryFuse::readdir(const path &path, void *buf, fuse_fill_dir_t filler, off_t try { auto entries = _device->readDir(fileinfo->fh); for (const auto &entry : *entries) { + //We could pass file metadata to filler() in its third parameter, + //but it doesn't help performance since fuse seems to ignore it. + //It does getattr() calls on all entries nevertheless. if (filler(buf, entry.c_str(), nullptr, 0) != 0) { return -ENOMEM; }