From ca6a3d1e396a65d25e54d331bef966178cd55375 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Thu, 28 Mar 2013 11:29:41 +0530 Subject: cluster/afr: piggyback and fsync resume changes 1) pre_op_piggyback should always be decremented. 2) Move fsync resume to just after post_op. 3) fsync stub should be created from afr's local not from the final response. Change-Id: I220bb532eb03bea584292f4dd2e816ad0c3e0cf7 BUG: 927146 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/4741 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/cluster/afr/src/afr-common.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'xlators/cluster/afr/src/afr-common.c') diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index c55adc1e..0eca2130 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -852,11 +852,6 @@ afr_local_transaction_cleanup (afr_local_t *local, xlator_t *this) loc_wipe (&local->transaction.new_parent_loc); GF_FREE (local->transaction.postop_piggybacked); - - if (local->transaction.resume_stub) { - call_resume (local->transaction.resume_stub); - local->transaction.resume_stub = NULL; - } } @@ -2692,8 +2687,10 @@ afr_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this, post-op. This guarantee is expected by FUSE graph switching for example. */ - stub = fop_fsync_cbk_stub (frame, default_fsync_cbk, op_ret, - op_errno, prebuf, postbuf, xdata); + stub = fop_fsync_cbk_stub (frame, default_fsync_cbk, + local->op_ret, local->op_errno, + &local->cont.fsync.prebuf, + &local->cont.fsync.postbuf, xdata); if (!stub) { AFR_STACK_UNWIND (fsync, frame, -1, ENOMEM, 0, 0, 0); return 0; -- cgit