From: Misono Tomohiro Date: Fri, 24 Jan 2020 15:53:32 +0000 (+0900) Subject: passthrough_ll: Use cache_readdir for directory open (#492) X-Git-Tag: fuse-3.9.1~11 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1caba629ff8e718a5af054be71338a8c3cb84d62;p=qemu-gpiodev%2Flibfuse.git passthrough_ll: Use cache_readdir for directory open (#492) Upstreamed from: https://www.redhat.com/archives/virtio-fs/2020-January/msg00106.html Since keep_cache(FOPEN_KEEP_CACHE) has no effect for directory as described in fuse_common.h, use cache_readdir(FOPEN_CACHE_DIR) for diretory open when cache=always mode. Signed-off-by: Misono Tomohiro --- diff --git a/example/passthrough_ll.c b/example/passthrough_ll.c index d80b493..c31dbe5 100644 --- a/example/passthrough_ll.c +++ b/example/passthrough_ll.c @@ -630,7 +630,7 @@ static void lo_opendir(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi fi->fh = (uintptr_t) d; if (lo->cache == CACHE_ALWAYS) - fi->keep_cache = 1; + fi->cache_readdir = 1; fuse_reply_open(req, fi); return;