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

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