summaryrefslogtreecommitdiffstats
path: root/xlators/features/locks/src/internal.c
diff options
context:
space:
mode:
authorAnand Avati <avati@gluster.com>2009-10-16 23:56:55 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-10-19 23:14:45 -0700
commit0fa1305ed3e3943b22d9a3340a4464daf7742ab3 (patch)
tree8330485ef16956b28ca873fe37e0e249408bce4d /xlators/features/locks/src/internal.c
parent04de4b6063617d4ad31b31fb0d24fe2242deb7f0 (diff)
locks: trace support for entrylk
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.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/xlators/features/locks/src/internal.c b/xlators/features/locks/src/internal.c
index 487826587..34087da6e 100644
--- a/xlators/features/locks/src/internal.c
+++ b/xlators/features/locks/src/internal.c
@@ -618,6 +618,9 @@ grant_blocked_entry_locks (xlator_t *this, pl_inode_t *pl_inode,
list_for_each_entry_safe (lock, tmp, &granted_list, blocked_locks) {
list_del_init (&lock->blocked_locks);
+ entrylk_trace_out (this, lock->frame, NULL, NULL, NULL,
+ lock->basename, ENTRYLK_LOCK, lock->type,
+ 0, 0);
STACK_UNWIND (lock->frame, 0, 0);
FREE (lock->basename);
@@ -715,6 +718,8 @@ pl_entrylk (call_frame_t *frame, xlator_t *this,
pid = frame->root->pid;
transport = frame->root->trans;
+ entrylk_trace_in (this, frame, volume, NULL, loc, basename, cmd, type);
+
if (pid == 0) {
/*
this is a special case that means release
@@ -786,8 +791,13 @@ pl_entrylk (call_frame_t *frame, xlator_t *this,
out:
pl_update_refkeeper (this, loc->inode);
if (unwind) {
+ entrylk_trace_out (this, frame, volume, NULL, loc, basename,
+ cmd, type, op_ret, op_errno);
STACK_UNWIND (frame, op_ret, op_errno);
- }
+ } else {
+ entrylk_trace_block (this, frame, volume, NULL, loc, basename,
+ cmd, type);
+ }
return 0;
}
@@ -825,6 +835,8 @@ pl_fentrylk (call_frame_t *frame, xlator_t *this,
pid = frame->root->pid;
transport = frame->root->trans;
+ entrylk_trace_in (this, frame, volume, fd, NULL, basename, cmd, type);
+
if (pid == 0) {
/*
this is a special case that means release
@@ -893,8 +905,13 @@ pl_fentrylk (call_frame_t *frame, xlator_t *this,
out:
pl_update_refkeeper (this, fd->inode);
if (unwind) {
+ entrylk_trace_out (this, frame, volume, fd, NULL, basename,
+ cmd, type, op_ret, op_errno);
STACK_UNWIND (frame, op_ret, op_errno);
- }
+ } else {
+ entrylk_trace_block (this, frame, volume, fd, NULL, basename,
+ cmd, type);
+ }
return 0;
}