]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
configure: HAVE_FALLOCATE -> CEPH_HAVE_FALLOCATE
authorSage Weil <sage.weil@dreamhost.com>
Mon, 9 Apr 2012 03:58:59 +0000 (20:58 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Mon, 9 Apr 2012 03:58:59 +0000 (20:58 -0700)
/usr/include/linux/fs.h defines this on CentOS 5, even though it does not
in fact compile.  This stupid workaround avoids the problem.

Reported-by: Nick Couchman <Nick.Couchman@seakr.com>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
configure.ac
src/os/FileStore.cc

index 6376c04f473d5248cdbbeaaeaa16a3739fa849f1..595c4fde25927c7fdcba7861e81f26a97edf42e1 100644 (file)
@@ -343,7 +343,7 @@ AC_CHECK_FUNC([sync_file_range],
 
 # fallocate
 AC_CHECK_FUNC([fallocate],
-       [AC_DEFINE([HAVE_FALLOCATE], [], [fallocate(2) is supported])],
+       [AC_DEFINE([CEPH_HAVE_FALLOCATE], [], [fallocate(2) is supported])],
        [])
 
 
index 8f1c74708b7ecb6a18093c8ed698f04e2013a81c..83832cd3dbf5b307e04981eed8622be9c39199f6 100644 (file)
@@ -3040,7 +3040,7 @@ int FileStore::_zero(coll_t cid, const hobject_t& oid, uint64_t offset, size_t l
   dout(15) << "zero " << cid << "/" << oid << " " << offset << "~" << len << dendl;
   int ret = 0;
 
-#ifdef HAVE_FALLOCATE
+#ifdef CEPH_HAVE_FALLOCATE
 # if !defined(DARWIN) && !defined(__FreeBSD__)
   // first try to punch a hole.
   int fd = lfn_open(cid, oid, O_RDONLY);