virtiofsd: passthrough_ll: Use cache_readdir for directory open
authorMisono Tomohiro <misono.tomohiro@jp.fujitsu.com>
Mon, 20 Jan 2020 02:53:30 +0000 (11:53 +0900)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Thu, 23 Jan 2020 16:41:37 +0000 (16:41 +0000)
Since keep_cache(FOPEN_KEEP_CACHE) has no effect for directory as
described in fuse_common.h, use cache_readdir(FOPNE_CACHE_DIR) for
diretory open when cache=always mode.

Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
tools/virtiofsd/passthrough_ll.c

index 4c61ac5065420517fae07a7aef36f6364fbc66c3..79b8b71a4fd3c10c57bc644cf4ce2d76ef54c8d9 100644 (file)
@@ -1523,7 +1523,7 @@ static void lo_opendir(fuse_req_t req, fuse_ino_t ino,
 
     fi->fh = fh;
     if (lo->cache == CACHE_ALWAYS) {
-        fi->keep_cache = 1;
+        fi->cache_readdir = 1;
     }
     fuse_reply_open(req, fi);
     return;