diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2011-09-20 18:30:42 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-09-21 04:25:15 -0700 |
commit | 03591027b06c556baa95c6fa4569be0bff4adcd8 (patch) | |
tree | acb3ff42e7df960a3d294916487e27e6757e0258 /xlators/cluster/afr/src/afr-lk-common.c | |
parent | 82d1a445b92526629d699f947a2d2bd029c8db75 (diff) |
cluster/afr: Make local->child_up immutable
Afr transaction performs lock, pre-op, op, post-op and unlock steps in that
order. The child_up[] is overloaded with the information of where all
the first two steps succeeded. This works perfectly fine for
Transaction, but the locking/unlocking part of the code is re-used by
data self-heal. In that each loop_frame does lock, rchecksum,
read-from-source and write-to-sinks, unlock steps.
Rchecksum fop assumes that the fop needs to happen on one source + all
sinks and sets the call_count to that number. But if the lock step fails
on any of the sinks it will mark the child_up of that child to 0, which
will result in call_count mismatch and the frame will hang thinking that
some more cbks need to come. When this happens loop_frame will never go
to unlock step leading to hangs on that file.
Change-Id: I3dd0449cc6193a980bacf637d935881f4b22210a
BUG: 3597
Reviewed-on: http://review.gluster.com/474
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amar@gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-lk-common.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-lk-common.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/xlators/cluster/afr/src/afr-lk-common.c b/xlators/cluster/afr/src/afr-lk-common.c index c8dd8b635e6..ba468dcdcb1 100644 --- a/xlators/cluster/afr/src/afr-lk-common.c +++ b/xlators/cluster/afr/src/afr-lk-common.c @@ -789,7 +789,6 @@ afr_lock_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int_lock->lock_op_ret = op_ret; } - local->child_up[child_index] = 0; local->op_errno = op_errno; int_lock->lock_op_errno = op_errno; } @@ -852,7 +851,6 @@ afr_lock_lower_cbk (call_frame_t *frame, void *cookie, xlator_t *this, local->op_ret = op_ret; } - local->child_up[child_index] = 0; local->op_errno = op_errno; } } @@ -1180,7 +1178,6 @@ afr_nonblocking_entrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this, local->op_ret = op_ret; int_lock->lock_op_ret = op_ret; - local->child_up[child_index] = 0; int_lock->lock_op_errno = op_errno; local->op_errno = op_errno; } @@ -1356,7 +1353,6 @@ afr_nonblocking_inodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this, "please load features/locks xlator on server"); local->op_ret = op_ret; int_lock->lock_op_ret = op_ret; - local->child_up[child_index] = 0; int_lock->lock_op_errno = op_errno; local->op_errno = op_errno; } |