cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-vitriofsd-passthrough_ll-fix-fallocate-ifdefs.patch

22c213
From 247987aa987b7332eb501e00c440079b9e8e1fe7 Mon Sep 17 00:00:00 2001
22c213
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
22c213
Date: Mon, 27 Jan 2020 19:00:52 +0100
22c213
Subject: [PATCH 021/116] vitriofsd/passthrough_ll: fix fallocate() ifdefs
22c213
MIME-Version: 1.0
22c213
Content-Type: text/plain; charset=UTF-8
22c213
Content-Transfer-Encoding: 8bit
22c213
22c213
RH-Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
22c213
Message-id: <20200127190227.40942-18-dgilbert@redhat.com>
22c213
Patchwork-id: 93471
22c213
O-Subject: [RHEL-AV-8.2 qemu-kvm PATCH 017/112] vitriofsd/passthrough_ll: fix fallocate() ifdefs
22c213
Bugzilla: 1694164
22c213
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
22c213
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
22c213
RH-Acked-by: Sergio Lopez Pascual <slp@redhat.com>
22c213
22c213
From: Xiao Yang <yangx.jy@cn.fujitsu.com>
22c213
22c213
1) Use correct CONFIG_FALLOCATE macro to check if fallocate() is supported.(i.e configure
22c213
   script sets CONFIG_FALLOCATE intead of HAVE_FALLOCATE if fallocate() is supported)
22c213
2) Replace HAVE_POSIX_FALLOCATE with CONFIG_POSIX_FALLOCATE.
22c213
22c213
Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
22c213
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
22c213
  Merged from two of Xiao Yang's patches
22c213
(cherry picked from commit 9776457ca6f05d5900e27decb1dba2ffddf95a22)
22c213
22c213
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
22c213
---
22c213
 tools/virtiofsd/passthrough_ll.c | 4 ++--
22c213
 1 file changed, 2 insertions(+), 2 deletions(-)
22c213
22c213
diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
22c213
index 322a889..6c4da18 100644
22c213
--- a/tools/virtiofsd/passthrough_ll.c
22c213
+++ b/tools/virtiofsd/passthrough_ll.c
22c213
@@ -975,13 +975,13 @@ static void lo_fallocate(fuse_req_t req, fuse_ino_t ino, int mode, off_t offset,
22c213
     int err = EOPNOTSUPP;
22c213
     (void)ino;
22c213
 
22c213
-#ifdef HAVE_FALLOCATE
22c213
+#ifdef CONFIG_FALLOCATE
22c213
     err = fallocate(fi->fh, mode, offset, length);
22c213
     if (err < 0) {
22c213
         err = errno;
22c213
     }
22c213
 
22c213
-#elif defined(HAVE_POSIX_FALLOCATE)
22c213
+#elif defined(CONFIG_POSIX_FALLOCATE)
22c213
     if (mode) {
22c213
         fuse_reply_err(req, EOPNOTSUPP);
22c213
         return;
22c213
-- 
22c213
1.8.3.1
22c213