From 21b06ce3e46c3125ee5f281b49f6fcc3a09c02e7 Mon Sep 17 00:00:00 2001 From: Pavan Sondur Date: Sun, 6 Dec 2009 10:34:39 +0000 Subject: features/locks: Correct the order of arguments and print a log message in pl_flush. Signed-off-by: Pavan Vilas Sondur Signed-off-by: Anand V. Avati BUG: 306 (Enhance locks to aid debugging) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=306 --- xlators/features/locks/src/posix.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c index d2902bd3ab9..5c25d680ea5 100644 --- a/xlators/features/locks/src/posix.c +++ b/xlators/features/locks/src/posix.c @@ -285,6 +285,16 @@ __delete_locks_of_owner (pl_inode_t *pl_inode, list_for_each_entry_safe (l, tmp, &pl_inode->ext_list, list) { if ((l->transport == transport) && (l->owner == owner)) { + gf_log ("posix-locks", GF_LOG_TRACE, + " Flushing lock" + "%s (pid=%d) (lk-owner=%"PRIu64") %"PRId64" - %"PRId64" state: %s", + l->fl_type == F_UNLCK ? "Unlock" : "Lock", + l->client_pid, + l->owner, + l->user_flock.l_start, + l->user_flock.l_len, + l->blocked == 1 ? "Blocked" : "Active"); + __delete_lock (pl_inode, l); __destroy_lock (l); } @@ -1199,8 +1209,8 @@ __dump_posixlks (pl_inode_t *pl_inode) gf_proc_dump_build_key(key, "xlator.feature.locks.lock-dump.domain.posixlk", "posixlk[%d](%s)", - lock->blocked ? "BLOCKED" : "ACTIVE", - count ); + count, + lock->blocked ? "BLOCKED" : "ACTIVE"); pl_dump_lock (tmp, 256, &lock->user_flock, lock->owner); gf_proc_dump_write(key, tmp); -- cgit