summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Dreyfus <manu@netbsd.org>2013-11-17 15:23:41 +0100
committerAnand Avati <avati@redhat.com>2013-11-19 13:32:39 -0800
commitd56be51dc665d96e4cd0fa25147b2d4da147561f (patch)
tree9e06f31617cd5f56704b07b1df7978142ca5ad99
parent00aafce07140a96e641ad5d1f701932823738aaa (diff)
Do not build fallocate FUSE FOP if the system call does not exist
BUG: 764655 Change-Id: Ica310e75bee16741b837e658981238c1b99c254f Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/6288 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index 6a5587c2d2e..71e8baabdfd 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -2729,6 +2729,7 @@ fuse_readdirp (xlator_t *this, fuse_in_header_t *finh, void *msg)
fuse_resolve_and_resume (state, fuse_readdirp_resume);
}
+#ifdef FALLOC_FL_KEEP_SIZE
static int
fuse_fallocate_cbk(call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *prebuf,
@@ -2769,6 +2770,7 @@ fuse_fallocate(xlator_t *this, fuse_in_header_t *finh, void *msg)
fuse_resolve_fd_init(state, &state->resolve, state->fd);
fuse_resolve_and_resume(state, fuse_fallocate_resume);
}
+#endif /* FALLOC_FL_KEEP_SIZE */
static void
@@ -5063,7 +5065,9 @@ static fuse_handler_t *fuse_std_ops[FUSE_OP_HIGH] = {
/* [FUSE_POLL] */
/* [FUSE_NOTIFY_REPLY] */
[FUSE_BATCH_FORGET]= fuse_batch_forget,
+#ifdef FALLOC_FL_KEEP_SIZE
[FUSE_FALLOCATE] = fuse_fallocate,
+#endif /* FALLOC_FL_KEEP_SIZE */
[FUSE_READDIRPLUS] = fuse_readdirp,
};