|
|
ddf19c |
From 1744329bcba4a3e1a82cec3b1a34b3fbf0a9d7cf Mon Sep 17 00:00:00 2001
|
|
|
ddf19c |
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
|
|
|
ddf19c |
Date: Mon, 27 Jan 2020 19:01:54 +0100
|
|
|
ddf19c |
Subject: [PATCH 083/116] virtiofsd: support nanosecond resolution for file
|
|
|
ddf19c |
timestamp
|
|
|
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-80-dgilbert@redhat.com>
|
|
|
ddf19c |
Patchwork-id: 93535
|
|
|
ddf19c |
O-Subject: [RHEL-AV-8.2 qemu-kvm PATCH 079/112] virtiofsd: support nanosecond resolution for file timestamp
|
|
|
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: Jiufei Xue <jiufei.xue@linux.alibaba.com>
|
|
|
ddf19c |
|
|
|
ddf19c |
Define HAVE_STRUCT_STAT_ST_ATIM to 1 if `st_atim' is member of `struct
|
|
|
ddf19c |
stat' which means support nanosecond resolution for the file timestamp
|
|
|
ddf19c |
fields.
|
|
|
ddf19c |
|
|
|
ddf19c |
Signed-off-by: Jiufei Xue <jiufei.xue@linux.alibaba.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 8a792b034d4b315251fd842bb4c73a133aa1368f)
|
|
|
ddf19c |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
ddf19c |
---
|
|
|
ddf19c |
configure | 16 ++++++++++++++++
|
|
|
ddf19c |
tools/virtiofsd/fuse_misc.h | 1 +
|
|
|
ddf19c |
2 files changed, 17 insertions(+)
|
|
|
ddf19c |
|
|
|
ddf19c |
diff --git a/configure b/configure
|
|
|
ddf19c |
index 7831618..5120c14 100755
|
|
|
ddf19c |
--- a/configure
|
|
|
ddf19c |
+++ b/configure
|
|
|
ddf19c |
@@ -5218,6 +5218,19 @@ if compile_prog "" "" ; then
|
|
|
ddf19c |
strchrnul=yes
|
|
|
ddf19c |
fi
|
|
|
ddf19c |
|
|
|
ddf19c |
+#########################################
|
|
|
ddf19c |
+# check if we have st_atim
|
|
|
ddf19c |
+
|
|
|
ddf19c |
+st_atim=no
|
|
|
ddf19c |
+cat > $TMPC << EOF
|
|
|
ddf19c |
+#include <sys/stat.h>
|
|
|
ddf19c |
+#include <stddef.h>
|
|
|
ddf19c |
+int main(void) { return offsetof(struct stat, st_atim); }
|
|
|
ddf19c |
+EOF
|
|
|
ddf19c |
+if compile_prog "" "" ; then
|
|
|
ddf19c |
+ st_atim=yes
|
|
|
ddf19c |
+fi
|
|
|
ddf19c |
+
|
|
|
ddf19c |
##########################################
|
|
|
ddf19c |
# check if trace backend exists
|
|
|
ddf19c |
|
|
|
ddf19c |
@@ -6919,6 +6932,9 @@ fi
|
|
|
ddf19c |
if test "$strchrnul" = "yes" ; then
|
|
|
ddf19c |
echo "HAVE_STRCHRNUL=y" >> $config_host_mak
|
|
|
ddf19c |
fi
|
|
|
ddf19c |
+if test "$st_atim" = "yes" ; then
|
|
|
ddf19c |
+ echo "HAVE_STRUCT_STAT_ST_ATIM=y" >> $config_host_mak
|
|
|
ddf19c |
+fi
|
|
|
ddf19c |
if test "$byteswap_h" = "yes" ; then
|
|
|
ddf19c |
echo "CONFIG_BYTESWAP_H=y" >> $config_host_mak
|
|
|
ddf19c |
fi
|
|
|
ddf19c |
diff --git a/tools/virtiofsd/fuse_misc.h b/tools/virtiofsd/fuse_misc.h
|
|
|
ddf19c |
index f252baa..5c618ce 100644
|
|
|
ddf19c |
--- a/tools/virtiofsd/fuse_misc.h
|
|
|
ddf19c |
+++ b/tools/virtiofsd/fuse_misc.h
|
|
|
ddf19c |
@@ -7,6 +7,7 @@
|
|
|
ddf19c |
*/
|
|
|
ddf19c |
|
|
|
ddf19c |
#include <pthread.h>
|
|
|
ddf19c |
+#include "config-host.h"
|
|
|
ddf19c |
|
|
|
ddf19c |
/*
|
|
|
ddf19c |
* Versioned symbols cannot be used in some cases because it
|
|
|
ddf19c |
--
|
|
|
ddf19c |
1.8.3.1
|
|
|
ddf19c |
|