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