branch, master, updated. v0.2-35-g356b684
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "". The branch, master has been updated via 356b68445bfb126a5623d8e9a08257c23e468df0 (commit) from 2271bb0e3b6392cbc5eecae6ad6d04e2aeeaedd0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 356b68445bfb126a5623d8e9a08257c23e468df0 Author: Phil Carns <[email protected]> Date: Thu Aug 14 14:18:06 2014 -0400 aefile_syncfs and autoconf check ----------------------------------------------------------------------- Summary of changes: configure.ac | 15 +++++++++++++++ src/aefile/aefile.ae | 22 ++++++++++++++++++++++ 2 files changed, 37 insertions(+), 0 deletions(-) Diff of changes: diff --git a/configure.ac b/configure.ac index c4323f0..fda19cc 100644 --- a/configure.ac +++ b/configure.ac @@ -338,6 +338,21 @@ AC_COMPILE_IFELSE( AC_SUBST(BLOCKSOPT) +AC_MSG_CHECKING(for syncfs) +AC_TRY_LINK( + [#define _GNU_SOURCE + #include <unistd.h> + ], + [ + syncfs(0); + ], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_SYNCFS, 1, Define if syncfs function is present) + , + AC_MSG_RESULT(no) +) + + AC_MSG_CHECKING(for fallocate) AC_TRY_LINK( [#define _GNU_SOURCE diff --git a/src/aefile/aefile.ae b/src/aefile/aefile.ae index bbfa173..9fae74a 100644 --- a/src/aefile/aefile.ae +++ b/src/aefile/aefile.ae @@ -241,6 +241,28 @@ __blocking int aefile_fallocate(int fd, int mode, off_t offset, off_t len) return(ret); } +__blocking int aefile_syncfs(int fd) +{ + int ret = 0; + + AETHREAD_RUN(); + +#ifdef HAVE_SYNCFS + ret = syncfs(fd); +#else + /* fall back is to sync everything */ + sync(); + ret = 0; +#endif + if(ret < 0) + { + ret = -errno; + } + + return(ret); +} + + /* hooks/post-receive --
participants (1)
-
noreply@mcs.anl.gov