diff options
author | Pavan Sondur <pavan@gluster.com> | 2009-12-06 10:34:39 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-12-06 08:56:17 -0800 |
commit | 21b06ce3e46c3125ee5f281b49f6fcc3a09c02e7 (patch) | |
tree | fd818ffd355d21cf59a1501f48a2596b16f91305 /xlators/features | |
parent | fdc187d11ead26710add3cd45dd5f306dad59900 (diff) |
features/locks: Correct the order of arguments and print a log message in pl_flush.
Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com>
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')
-rw-r--r-- | xlators/features/locks/src/posix.c | 14 |
1 files 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); |