summaryrefslogtreecommitdiffstats
path: root/xlators/features/locks/src/entrylk.c
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kp@gluster.com>2011-09-29 16:44:40 +0530
committerVijay Bellur <vijay@gluster.com>2011-09-30 00:50:04 -0700
commitba20df9f1a218177e7c7dcc15a11143183d28243 (patch)
tree1406c543efb7604f0d410ca2ed1af9e72562fdbd /xlators/features/locks/src/entrylk.c
parentb9c48822413fad5caaafa92c039dae6494476d76 (diff)
locks: dump client pid and time of blocking/granting.
Change-Id: Icaa919f3009fb70f6af9b95fceaf800f3beca447 BUG: 3662 Reviewed-on: http://review.gluster.com/532 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/features/locks/src/entrylk.c')
-rw-r--r--xlators/features/locks/src/entrylk.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/features/locks/src/entrylk.c b/xlators/features/locks/src/entrylk.c
index c3f40829b57..886a30b0ef2 100644
--- a/xlators/features/locks/src/entrylk.c
+++ b/xlators/features/locks/src/entrylk.c
@@ -349,6 +349,7 @@ __lock_name (pl_inode_t *pinode, const char *basename, entrylk_type type,
}
+ gettimeofday (&lock->blkd_time, NULL);
list_add_tail (&lock->blocked_locks, &dom->blocked_entrylks);
gf_log (this->name, GF_LOG_TRACE,
@@ -370,6 +371,7 @@ __lock_name (pl_inode_t *pinode, const char *basename, entrylk_type type,
lock->frame = frame;
lock->this = this;
+ gettimeofday (&lock->blkd_time, NULL);
list_add_tail (&lock->blocked_locks, &dom->blocked_entrylks);
gf_log (this->name, GF_LOG_TRACE,
@@ -384,6 +386,7 @@ __lock_name (pl_inode_t *pinode, const char *basename, entrylk_type type,
switch (type) {
case ENTRYLK_WRLCK:
+ gettimeofday (&lock->granted_time, NULL);
list_add_tail (&lock->domain_list, &dom->entrylk_list);
break;