diff options
author | Sage Weil <sage@newdream.net> | 2012-03-08 14:30:06 -0800 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2012-03-08 14:30:06 -0800 |
commit | ed6cc47b18ff78d6628a7dcba9873b717ba02a1a (patch) | |
tree | 2124a06d91d785e8539453edf7fad9a58d971a5f /configure.ac | |
parent | 1468d95101adfad44247016a1399aab6b86708d2 (diff) | |
download | ceph-ed6cc47b18ff78d6628a7dcba9873b717ba02a1a.tar.gz |
filestore: use FL_ALLOC_PUNCH_HOLE to zero, when available
First try the FL_ALLOC_PUNCH_HOLE fallocate() flag. If we get EOPNOTSUPP,
fall back to writing zeros.
Check for fallocate(2) with configure. Also, avoid this if we are not
Linux, since I'm not sure about the hard-coded FL_ALLOC_PUNCH_HOLE being
correct on other platforms.
Signed-off-by: Sage Weil <sage@newdream.net>
Reviewed-by: Samuel Just <samuel.just@dreamhost.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 515243d24c0..81422145975 100644 --- a/configure.ac +++ b/configure.ac @@ -339,6 +339,11 @@ AC_CHECK_FUNC([sync_file_range], [AC_DEFINE([HAVE_SYNC_FILE_RANGE], [], [sync_file_range(2) is supported])], []) +# fallocate +AC_CHECK_FUNC([fallocate], + [AC_DEFINE([HAVE_FALLOCATE], [], [fallocate(2) is supported])], + []) + # Checks for typedefs, structures, and compiler characteristics. #AC_HEADER_STDBOOL |