yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-virtiofsd-passthrough_ll-disable-readdirplus-on-cach.patch

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