From bbf92338e5e5eed796d511d2bd3c3686b7d1e5fd Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Mon, 27 Jan 2020 19:01:46 +0100 Subject: [PATCH 075/116] virtiofsd: passthrough_ll: disable readdirplus on cache=never MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RH-Author: Dr. David Alan Gilbert Message-id: <20200127190227.40942-72-dgilbert@redhat.com> Patchwork-id: 93525 O-Subject: [RHEL-AV-8.2 qemu-kvm PATCH 071/112] virtiofsd: passthrough_ll: disable readdirplus on cache=never Bugzilla: 1694164 RH-Acked-by: Philippe Mathieu-Daudé RH-Acked-by: Stefan Hajnoczi RH-Acked-by: Sergio Lopez Pascual From: Miklos Szeredi ...because the attributes sent in the READDIRPLUS reply would be discarded anyway. Signed-off-by: Miklos Szeredi Reviewed-by: Daniel P. Berrangé Signed-off-by: Dr. David Alan Gilbert (cherry picked from commit ddcbabcb0ea177be3ec3500726b699c7c26ffd93) Signed-off-by: Miroslav Rezanina --- tools/virtiofsd/passthrough_ll.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index 18d69ab..6480c51 100644 --- a/tools/virtiofsd/passthrough_ll.c +++ b/tools/virtiofsd/passthrough_ll.c @@ -478,6 +478,10 @@ static void lo_init(void *userdata, struct fuse_conn_info *conn) fuse_log(FUSE_LOG_DEBUG, "lo_init: activating flock locks\n"); conn->want |= FUSE_CAP_FLOCK_LOCKS; } + if (lo->cache == CACHE_NEVER) { + fuse_log(FUSE_LOG_DEBUG, "lo_init: disabling readdirplus\n"); + conn->want &= ~FUSE_CAP_READDIRPLUS; + } } static void lo_getattr(fuse_req_t req, fuse_ino_t ino, -- 1.8.3.1