diff options
author | Pavan Sondur <pavan@gluster.com> | 2009-12-03 14:51:10 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-12-03 12:45:11 -0800 |
commit | 120b446967ef33701a31d0da23324177922a3d73 (patch) | |
tree | 1331a92ed1dd0692dbec80f73ac40481da98dca5 /xlators/features/locks/src/common.c | |
parent | 83487d024bcfe671ef83752c8c3a8b56b8dcee2b (diff) |
features/locks: Changes in log messages reflecting lk-owner.
Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 336 (Use lock owner field from fuse in locks)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=336
Diffstat (limited to 'xlators/features/locks/src/common.c')
-rw-r--r-- | xlators/features/locks/src/common.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/xlators/features/locks/src/common.c b/xlators/features/locks/src/common.c index f535845929a..58b95d20781 100644 --- a/xlators/features/locks/src/common.c +++ b/xlators/features/locks/src/common.c @@ -120,8 +120,9 @@ __pl_inode_is_empty (pl_inode_t *pl_inode) void pl_print_locker (char *str, int size, xlator_t *this, call_frame_t *frame) { - snprintf (str, size, "Pid=%llu, Transport=%p, Frame=%llu", + snprintf (str, size, "Pid=%llu, lk-owner=%llu, Transport=%p, Frame=%llu", (unsigned long long) frame->root->pid, + (unsigned long long) frame->root->lk_owner, (void *)frame->root->trans, (unsigned long long) frame->root->unique); } @@ -162,7 +163,8 @@ pl_print_lockee (char *str, int size, fd_t *fd, loc_t *loc) void -pl_print_lock (char *str, int size, int cmd, struct flock *flock) +pl_print_lock (char *str, int size, int cmd, + struct flock *flock, uint64_t owner) { char *cmd_str = NULL; char *type_str = NULL; @@ -209,10 +211,12 @@ pl_print_lock (char *str, int size, int cmd, struct flock *flock) break; } - snprintf (str, size, "cmd=%s, type=%s, start=%llu, len=%llu, pid=%llu", + snprintf (str, size, "lock=FCNTL, cmd=%s, type=%s, " + "start=%llu, len=%llu, pid=%llu, lk-owner=%llu", cmd_str, type_str, (unsigned long long) flock->l_start, (unsigned long long) flock->l_len, - (unsigned long long) flock->l_pid); + (unsigned long long) flock->l_pid, + (unsigned long long) owner); } @@ -235,7 +239,7 @@ pl_trace_in (xlator_t *this, call_frame_t *frame, fd_t *fd, loc_t *loc, if (domain) pl_print_inodelk (pl_lock, 256, cmd, flock, domain); else - pl_print_lock (pl_lock, 256, cmd, flock); + pl_print_lock (pl_lock, 256, cmd, flock, frame->root->lk_owner); gf_log (this->name, GF_LOG_NORMAL, "[REQUEST] Locker = {%s} Lockee = {%s} Lock = {%s}", @@ -285,7 +289,7 @@ pl_trace_out (xlator_t *this, call_frame_t *frame, fd_t *fd, loc_t *loc, if (domain) pl_print_inodelk (pl_lock, 256, cmd, flock, domain); else - pl_print_lock (pl_lock, 256, cmd, flock); + pl_print_lock (pl_lock, 256, cmd, flock, frame->root->lk_owner); pl_print_verdict (verdict, 32, op_ret, op_errno); @@ -315,7 +319,7 @@ pl_trace_block (xlator_t *this, call_frame_t *frame, fd_t *fd, loc_t *loc, if (domain) pl_print_inodelk (pl_lock, 256, cmd, flock, domain); else - pl_print_lock (pl_lock, 256, cmd, flock); + pl_print_lock (pl_lock, 256, cmd, flock, frame->root->lk_owner); gf_log (this->name, GF_LOG_NORMAL, "[BLOCKED] Locker = {%s} Lockee = {%s} Lock = {%s}", |