From d56be51dc665d96e4cd0fa25147b2d4da147561f Mon Sep 17 00:00:00 2001 From: Emmanuel Dreyfus Date: Sun, 17 Nov 2013 15:23:41 +0100 Subject: Do not build fallocate FUSE FOP if the system call does not exist BUG: 764655 Change-Id: Ica310e75bee16741b837e658981238c1b99c254f Signed-off-by: Emmanuel Dreyfus Reviewed-on: http://review.gluster.org/6288 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/mount/fuse/src/fuse-bridge.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'xlators') diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index 6a5587c2d..71e8baabd 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, }; -- cgit