diff options
author | Basavanagowda Kanur <gowda@gluster.com> | 2009-07-07 07:58:05 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-07-07 16:51:54 -0700 |
commit | 73c32c9ab17ee104d319882227f4a01849e544b9 (patch) | |
tree | 4c90431cdda13cfccd92fb65a5aed2973a4029a6 | |
parent | 428d17946b5bb5946996f045811fdc2393378737 (diff) |
use fuse_reply_iov() in fuse_readv_cbk
changes come in two places.
configure.ac - define HAVE_FUSE_REPLY_IOV if fuse_reply_iov is
available in libfuse.
mount/fuse - use fuse_reply_iov() in place of fuse_reply_vec(), if
HAVE_FUSE_REPLY_IOV is defined.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
-rw-r--r-- | configure.ac | 9 | ||||
-rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.c | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 277f3661518..e58bbee7ae5 100644 --- a/configure.ac +++ b/configure.ac @@ -313,9 +313,18 @@ if test "x$enable_fuse_client" != "xno"; then , [HAVE_FUSE_VERSION_28="yes"], [HAVE_FUSE_VERSION_28="no"]) + + AC_CHECK_LIB([fuse], + [fuse_reply_iov], + [HAVE_FUSE_REPLY_IOV="yes"], + [HAVE_FUSE_REPLY_IOV="no"]) + fi fi +if test "x$HAVE_FUSE_REPLY_IOV" = "xyes"; then + AC_DEFINE(HAVE_FUSE_REPLY_IOV, 1, [found fuse_reply_iov]) +fi if test "x$HAVE_LIBFUSE" = "xyes" -a "x$HAVE_FUSE_VERSION_28" = "xyes"; then AC_DEFINE(HAVE_FUSE_VERSION_28, 1, [found fuse 2.8 version]) diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index 6947a156d5c..4e856bdd26b 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -1466,7 +1466,11 @@ fuse_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this, frame->root->unique, op_ret, state->size, state->off, stbuf->st_size); +#ifdef HAVE_FUSE_REPLY_IOV + fuse_reply_iov (req, vector, count); +#else fuse_reply_vec (req, vector, count); +#endif } else { gf_log ("glusterfs-fuse", GF_LOG_WARNING, "%"PRId64": READ => %d (%s)", frame->root->unique, |