summaryrefslogtreecommitdiffstats
path: root/xlators/features/locks/src/common.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/common.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/common.c')
-rw-r--r--xlators/features/locks/src/common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/features/locks/src/common.c b/xlators/features/locks/src/common.c
index 4e089a0ee36..4b6a810fde8 100644
--- a/xlators/features/locks/src/common.c
+++ b/xlators/features/locks/src/common.c
@@ -533,6 +533,11 @@ posix_lock_to_flock (posix_lock_t *lock, struct gf_flock *flock)
static void
__insert_lock (pl_inode_t *pl_inode, posix_lock_t *lock)
{
+ if (lock->blocked)
+ gettimeofday (&lock->blkd_time, NULL);
+ else
+ gettimeofday (&lock->granted_time, NULL);
+
list_add_tail (&lock->list, &pl_inode->ext_list);
return;