aboutsummaryrefslogtreecommitdiffstats
path: root/example/passthrough_ll.c
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2025-01-01 20:47:41 +0100
committerGitHub <noreply@github.com>2025-01-01 20:47:41 +0100
commit666b2c3fa5159e3c72a0d08117507475117c9319 (patch)
tree261596db3634fe18b1ab30b8d0f1c24a4fce199a /example/passthrough_ll.c
parent3d743029dc9bfeddcc4b2e8f7bffd98cd89c1026 (diff)
downloadlibfuse-666b2c3fa5159e3c72a0d08117507475117c9319.tar.gz
passthrough_ll: set correct keep_cache flag in opendir (#1083)
In cache=always mode, set keep_cache flag in opendir(), same as done in open() and same as passthrough_hp does in opendir(). In the default cache=auto mode, use readdir cache, but do not set keep_cache, same as regular files use page cache for an open file, but do not keep_cache for a new open. Note that passthrough_hp by default behaves the same as passthrough_ll cache=always mode and supports the cache=never mode with --nocache, but it does not support the equivalent of cache=auto mode. Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Diffstat (limited to 'example/passthrough_ll.c')
-rw-r--r--example/passthrough_ll.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/example/passthrough_ll.c b/example/passthrough_ll.c
index 5f1fde9..e1a36ef 100644
--- a/example/passthrough_ll.c
+++ b/example/passthrough_ll.c
@@ -652,8 +652,10 @@ static void lo_opendir(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi
d->entry = NULL;
fi->fh = (uintptr_t) d;
- if (lo->cache == CACHE_ALWAYS)
+ if (lo->cache != CACHE_NEVER)
fi->cache_readdir = 1;
+ if (lo->cache == CACHE_ALWAYS)
+ fi->keep_cache = 1;
fuse_reply_open(req, fi);
return;