From 1477fe376ae51ae077430aea25aa6a7a34596768 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Sun, 18 Mar 2012 14:10:08 +0530 Subject: Logs: Improved logs in lock/unlock execution path Statedump will now start showing the lk-owner of the stack. Change-Id: I9f650ce9a8b528cd626c8bb595c1bd1050462c86 BUG: 803209 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.com/2968 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/features/locks/src/inodelk.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'xlators/features/locks/src/inodelk.c') diff --git a/xlators/features/locks/src/inodelk.c b/xlators/features/locks/src/inodelk.c index b8b5643e81a..cbc9186aab4 100644 --- a/xlators/features/locks/src/inodelk.c +++ b/xlators/features/locks/src/inodelk.c @@ -298,18 +298,22 @@ __inode_unlock_lock (xlator_t *this, pl_inode_lock_t *lock, pl_dom_list_t *dom) conf = find_matching_inodelk (lock, dom); if (!conf) { - gf_log (this->name, GF_LOG_DEBUG, - " Matching lock not found for unlock"); + gf_log (this->name, GF_LOG_ERROR, + " Matching lock not found for unlock %llu-%llu, by %s " + "on %p", (unsigned long long)lock->fl_start, + (unsigned long long)lock->fl_end, + lkowner_utoa (&lock->owner), lock->transport); goto out; } __delete_inode_lock (conf); gf_log (this->name, GF_LOG_DEBUG, - " Matching lock found for unlock"); + " Matching lock found for unlock %llu-%llu, by %s on %p", + (unsigned long long)lock->fl_start, + (unsigned long long)lock->fl_end, lkowner_utoa (&lock->owner), + lock->transport); out: return conf; - - } static void __grant_blocked_inode_locks (xlator_t *this, pl_inode_t *pl_inode, -- cgit