return _fsync(in, syncdataonly);
}
-#ifdef FALLOC_FL_PUNCH_HOLE
-
int Client::_fallocate(Fh *fh, int mode, int64_t offset, int64_t length)
{
ceph_assert(ceph_mutex_is_locked_by_me(client_lock));
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 -CEPHFS_EOPNOTSUPP;
-}
-
-#endif
-
int Client::ll_fallocate(Fh *fh, int mode, int64_t offset, int64_t length)
{
*/
#define CEPH_REQ_FLAG_MASK (AT_SYMLINK_NOFOLLOW|AT_NO_ATTR_SYNC)
+/* fallocate mode flags */
+#ifndef FALLOC_FL_KEEP_SIZE
+#define FALLOC_FL_KEEP_SIZE 0x01
+#endif
+#ifndef FALLOC_FL_PUNCH_HOLE
+#define FALLOC_FL_PUNCH_HOLE 0x02
+#endif
+
/* delegation recalls */
typedef void (*ceph_deleg_cb_t)(Fh *fh, void *priv);