diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2012-04-25 14:58:31 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2012-05-07 00:48:48 -0700 |
commit | ca5861fdf9fdf9c29523893418312bdf1796c28e (patch) | |
tree | 75e7b53bd2a335a81f06f701fcd64c6cc95a51e9 /xlators | |
parent | c5d9ac3477d295b5e97166ac655a52463a0d1fb8 (diff) |
cluster/afr: Fix inodelk-trace logs to print lk-owners
Change-Id: Icc983effcf1b6283410a162f260755e97d41ee65
BUG: 810502
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3228
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/cluster/afr/src/afr-lk-common.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/xlators/cluster/afr/src/afr-lk-common.c b/xlators/cluster/afr/src/afr-lk-common.c index 226e88c10..46de21435 100644 --- a/xlators/cluster/afr/src/afr-lk-common.c +++ b/xlators/cluster/afr/src/afr-lk-common.c @@ -296,11 +296,10 @@ afr_trace_inodelk_out (call_frame_t *frame, xlator_t *this, afr_print_verdict (op_ret, op_errno, verdict); gf_log (this->name, GF_LOG_INFO, - "[%s %s] [%s] Lockee={%s} Number={%llu}", + "[%s %s] [%s] lk-owner=%s Lockee={%s} Number={%llu}", lock_call_type_str, lk_op_type == AFR_LOCK_OP ? "LOCK REPLY" : "UNLOCK REPLY", - verdict, - lockee, + verdict, lkowner_utoa (&frame->root->lk_owner), lockee, (unsigned long long) int_lock->lock_number); } @@ -652,6 +651,10 @@ afr_unlock_inodelk (call_frame_t *frame, xlator_t *this) } UNLOCK (&local->fd->lock); + if (!fd_lock_owner) { + afr_set_lk_owner (frame, this, local->fd); + fd_lock_owner = _gf_true; + } if (piggyback) { afr_unlock_inodelk_cbk (frame, (void *) (long) i, this, 1, 0, NULL); @@ -660,10 +663,6 @@ afr_unlock_inodelk (call_frame_t *frame, xlator_t *this) continue; } - if (!fd_lock_owner) { - afr_set_lk_owner (frame, this, local->fd); - fd_lock_owner = _gf_true; - } flock_use = &full_flock; wind: AFR_TRACE_INODELK_IN (frame, this, @@ -1508,6 +1507,11 @@ afr_nonblocking_inodelk (call_frame_t *frame, xlator_t *this) } UNLOCK (&local->fd->lock); + if (!fd_lock_owner) { + afr_set_lk_owner (frame, this, local->fd); + fd_lock_owner = _gf_true; + } + if (piggyback) { /* (op_ret == 1) => indicate piggybacked lock */ afr_nonblocking_inodelk_cbk (frame, (void *) (long) i, @@ -1517,10 +1521,6 @@ afr_nonblocking_inodelk (call_frame_t *frame, xlator_t *this) continue; } flock_use = &full_flock; - if (!fd_lock_owner) { - afr_set_lk_owner (frame, this, local->fd); - fd_lock_owner = _gf_true; - } wind: AFR_TRACE_INODELK_IN (frame, this, AFR_INODELK_NB_TRANSACTION, |