]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #837 from ceph/port/fallocate
authorSage Weil <sage@inktank.com>
Fri, 27 Dec 2013 05:33:39 +0000 (21:33 -0800)
committerSage Weil <sage@inktank.com>
Fri, 27 Dec 2013 05:33:39 +0000 (21:33 -0800)
FileJournal: zero-fill in-lieu of posix_fallocate

We may want to change that to a #warning later...

Reviewed-by: Sage Weil <sage@inktank.com>
1  2 
configure.ac
src/os/FileJournal.cc

diff --cc configure.ac
index c76bd12d45dd527a9c1685728b4f805d60d27725,ccb48103a72eefdb3abd432b885bb8a01c72f3ee..3520acf1213203d5193e0858d14e85599298790d
@@@ -615,33 -539,9 +615,34 @@@ AC_CHECK_FUNC([fallocate]
        [AC_DEFINE([CEPH_HAVE_FALLOCATE], [], [fallocate(2) is supported])],
        [])
  
 +#
 +# Test for time-related `struct stat` members.
 +#
 +
 +AC_CHECK_MEMBER([struct stat.st_mtim.tv_nsec],
 +  [AC_DEFINE(HAVE_STAT_ST_MTIM_TV_NSEC, 1,
 +    [Define if you have struct stat.st_mtim.tv_nsec])])
 +
 +AC_CHECK_MEMBER([struct stat.st_mtimespec.tv_nsec],
 +  [AC_DEFINE(HAVE_STAT_ST_MTIMESPEC_TV_NSEC, 1,
 +    [Define if you have struct stat.st_mtimespec.tv_nsec])])
 +
 +# splice/tee
 +AC_CHECK_FUNC([splice],
 +      [AC_DEFINE([CEPH_HAVE_SPLICE], [], [splice(2) is supported])],
 +      [])
 +
 +
 +AC_CHECK_HEADERS([arpa/nameser_compat.h])
 +
 +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <fcntl.h>
 +F_SETPIPE_SZ]])],
 +      [AC_DEFINE([CEPH_HAVE_SETPIPE_SZ], [], [F_SETPIPE_SZ is supported])],
 +      [AC_MSG_NOTICE(["F_SETPIPE_SZ not found, zero-copy may be less efficent"])])
 +
  
  AC_CHECK_HEADERS([arpa/nameser_compat.h])
+ AC_CHECK_FUNCS([posix_fallocate])
  AC_CHECK_HEADERS([sys/prctl.h])
  AC_CHECK_FUNCS([prctl])
  AC_CHECK_FUNCS([pipe2])
Simple merge