#include <sys/stat.h>
#include <sys/param.h>
#include <fcntl.h>
+
+#if defined(__linux__)
#include <linux/falloc.h>
+#endif
#include <sys/statvfs.h>
return _fsync(fh, syncdataonly);
}
+#ifdef FALLOC_FL_PUNCH_HOLE
+
int Client::_fallocate(Fh *fh, int mode, int64_t offset, int64_t length)
{
if (offset < 0 || length <= 0)
put_cap_ref(in, CEPH_CAP_FILE_WR);
return r;
}
+#else
+
+int Client::_fallocate(Fh *fh, int mode, int64_t offset, int64_t length)
+{
+ return -EOPNOTSUPP;
+}
+
+#endif
+
int Client::ll_fallocate(Fh *fh, int mode, loff_t offset, loff_t length)
{