[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 076/108] virtiofsd: support nanosecond resolution for file timesta
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PULL 076/108] virtiofsd: support nanosecond resolution for file timestamp |
Date: |
Thu, 23 Jan 2020 16:45:58 +0000 |
From: Jiufei Xue <address@hidden>
Define HAVE_STRUCT_STAT_ST_ATIM to 1 if `st_atim' is member of `struct
stat' which means support nanosecond resolution for the file timestamp
fields.
Signed-off-by: Jiufei Xue <address@hidden>
Reviewed-by: Daniel P. Berrangé <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
---
configure | 16 ++++++++++++++++
tools/virtiofsd/fuse_misc.h | 1 +
2 files changed, 17 insertions(+)
diff --git a/configure b/configure
index d91eab4d65..6ab028dd0d 100755
--- a/configure
+++ b/configure
@@ -5197,6 +5197,19 @@ if compile_prog "" "" ; then
strchrnul=yes
fi
+#########################################
+# check if we have st_atim
+
+st_atim=no
+cat > $TMPC << EOF
+#include <sys/stat.h>
+#include <stddef.h>
+int main(void) { return offsetof(struct stat, st_atim); }
+EOF
+if compile_prog "" "" ; then
+ st_atim=yes
+fi
+
##########################################
# check if trace backend exists
@@ -6895,6 +6908,9 @@ fi
if test "$strchrnul" = "yes" ; then
echo "HAVE_STRCHRNUL=y" >> $config_host_mak
fi
+if test "$st_atim" = "yes" ; then
+ echo "HAVE_STRUCT_STAT_ST_ATIM=y" >> $config_host_mak
+fi
if test "$byteswap_h" = "yes" ; then
echo "CONFIG_BYTESWAP_H=y" >> $config_host_mak
fi
diff --git a/tools/virtiofsd/fuse_misc.h b/tools/virtiofsd/fuse_misc.h
index f252baa752..5c618ce21f 100644
--- a/tools/virtiofsd/fuse_misc.h
+++ b/tools/virtiofsd/fuse_misc.h
@@ -7,6 +7,7 @@
*/
#include <pthread.h>
+#include "config-host.h"
/*
* Versioned symbols cannot be used in some cases because it
--
2.24.1
- [PULL 066/108] contrib/libvhost-user: Protect slave fd with mutex, (continued)
- [PULL 066/108] contrib/libvhost-user: Protect slave fd with mutex, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 068/108] virtiofsd: passthrough_ll: disable readdirplus on cache=never, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 070/108] virtiofsd: rename unref_inode() to unref_inode_lolocked(), Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 072/108] virtiofsd: extract root inode init into setup_root(), Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 073/108] virtiofsd: passthrough_ll: clean up cache related options, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 071/108] virtiofsd: fail when parent inode isn't known in lo_do_lookup(), Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 069/108] virtiofsd: passthrough_ll: control readdirplus, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 075/108] virtiofsd: Clean up inodes on destroy, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 074/108] virtiofsd: passthrough_ll: use hashtable, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 077/108] virtiofsd: fix error handling in main(), Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 076/108] virtiofsd: support nanosecond resolution for file timestamp,
Dr. David Alan Gilbert (git) <=
- [PULL 080/108] virtiofsd: add helper for lo_data cleanup, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 078/108] virtiofsd: cleanup allocated resource in se, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 079/108] virtiofsd: fix memory leak on lo.source, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 081/108] virtiofsd: Prevent multiply running with same vhost_user_socket, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 082/108] virtiofsd: enable PARALLEL_DIROPS during INIT, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 083/108] virtiofsd: fix incorrect error handling in lo_do_lookup, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 084/108] Virtiofsd: fix memory leak on fuse queueinfo, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 086/108] virtiofsd: use fuse_lowlevel_is_virtio() in fuse_session_destroy(), Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 085/108] virtiofsd: Support remote posix locks, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 088/108] virtiofsd: make lo_release() atomic, Dr. David Alan Gilbert (git), 2020/01/23