diff options
| author | Anand Avati <avati@gluster.com> | 2009-10-17 00:58:01 +0000 |
|---|---|---|
| committer | Anand V. Avati <avati@dev.gluster.com> | 2009-10-19 23:14:49 -0700 |
| commit | fbaea55d731ea9891c1c6ae08dea6b7765e7ad11 (patch) | |
| tree | 9054c2dbd9e84efd7892a18908442ef5267e3dd1 /xlators/features/locks/src/internal.c | |
| parent | 0fa1305ed3e3943b22d9a3340a4464daf7742ab3 (diff) | |
locks: trace support for inodelk
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 306 (Enhance locks to aid debugging)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=306
Diffstat (limited to 'xlators/features/locks/src/internal.c')
| -rw-r--r-- | xlators/features/locks/src/internal.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/xlators/features/locks/src/internal.c b/xlators/features/locks/src/internal.c index 34087da6e..116902fa8 100644 --- a/xlators/features/locks/src/internal.c +++ b/xlators/features/locks/src/internal.c @@ -134,6 +134,8 @@ pl_inodelk (call_frame_t *frame, xlator_t *this, goto unwind; } + pl_trace_in (this, frame, NULL, loc, cmd, flock); + if (client_pid == 0) { /* special case: this means release all locks @@ -169,8 +171,11 @@ pl_inodelk (call_frame_t *frame, xlator_t *this, can_block, GF_LOCK_INTERNAL); if (ret == -1) { - if (can_block) + if (can_block) { + pl_trace_block (this, frame, NULL, loc, + cmd, flock); goto out; + } gf_log (this->name, GF_LOG_TRACE, "returning EAGAIN"); op_errno = EAGAIN; @@ -192,6 +197,7 @@ pl_inodelk (call_frame_t *frame, xlator_t *this, unwind: pl_update_refkeeper (this, loc->inode); + pl_trace_out (this, frame, NULL, loc, cmd, flock, op_ret, op_errno); STACK_UNWIND (frame, op_ret, op_errno); out: return 0; @@ -236,6 +242,8 @@ pl_finodelk (call_frame_t *frame, xlator_t *this, goto unwind; } + pl_trace_in (this, frame, fd, NULL, cmd, flock); + if (client_pid == 0) { /* special case: this means release all locks @@ -272,8 +280,11 @@ pl_finodelk (call_frame_t *frame, xlator_t *this, can_block, GF_LOCK_INTERNAL); if (ret == -1) { - if (can_block) + if (can_block) { + pl_trace_block (this, frame, fd, NULL, + cmd, flock); goto out; + } gf_log (this->name, GF_LOG_TRACE, "Returning EAGAIN"); op_errno = EAGAIN; @@ -295,6 +306,7 @@ pl_finodelk (call_frame_t *frame, xlator_t *this, unwind: pl_update_refkeeper (this, fd->inode); + pl_trace_out (this, frame, fd, NULL, cmd, flock, op_ret, op_errno); STACK_UNWIND (frame, op_ret, op_errno); out: return 0; |
