Blame 0077-virtiofsd-passthrough_ll-disable-readdirplus-on-cach.patch

1d442b
From: Miklos Szeredi <mszeredi@redhat.com>
1d442b
Date: Mon, 27 Jan 2020 19:01:46 +0000
1d442b
Subject: [PATCH] virtiofsd: passthrough_ll: disable readdirplus on cache=never
1d442b
MIME-Version: 1.0
1d442b
Content-Type: text/plain; charset=UTF-8
1d442b
Content-Transfer-Encoding: 8bit
1d442b
1d442b
...because the attributes sent in the READDIRPLUS reply would be discarded
1d442b
anyway.
1d442b
1d442b
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
1d442b
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
1d442b
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
1d442b
(cherry picked from commit ddcbabcb0ea177be3ec3500726b699c7c26ffd93)
1d442b
---
1d442b
 tools/virtiofsd/passthrough_ll.c | 4 ++++
1d442b
 1 file changed, 4 insertions(+)
1d442b
1d442b
diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
1d442b
index 18d69abcbc..6480c517dc 100644
1d442b
--- a/tools/virtiofsd/passthrough_ll.c
1d442b
+++ b/tools/virtiofsd/passthrough_ll.c
1d442b
@@ -478,6 +478,10 @@ static void lo_init(void *userdata, struct fuse_conn_info *conn)
1d442b
         fuse_log(FUSE_LOG_DEBUG, "lo_init: activating flock locks\n");
1d442b
         conn->want |= FUSE_CAP_FLOCK_LOCKS;
1d442b
     }
1d442b
+    if (lo->cache == CACHE_NEVER) {
1d442b
+        fuse_log(FUSE_LOG_DEBUG, "lo_init: disabling readdirplus\n");
1d442b
+        conn->want &= ~FUSE_CAP_READDIRPLUS;
1d442b
+    }
1d442b
 }
1d442b
 
1d442b
 static void lo_getattr(fuse_req_t req, fuse_ino_t ino,