summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorPavan Sondur <pavan@gluster.com>2010-09-09 01:16:44 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-09 01:04:14 -0700
commitf0121a3d7896ace6d3d525c41d13f695bc8e25c9 (patch)
treec7fb70bca10570fa6ae02be78b8fde6885126370 /xlators
parent8e4650a662d0fddd1a67dff765bdf20046b70abe (diff)
features/locks: Dump transport pointer also while dumping locks.
Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1577 (dump transport pointer as part of dumping locks) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1577
Diffstat (limited to 'xlators')
-rw-r--r--xlators/features/locks/src/posix.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c
index 37bec028ee7..165280265ad 100644
--- a/xlators/features/locks/src/posix.c
+++ b/xlators/features/locks/src/posix.c
@@ -1183,7 +1183,8 @@ out:
}
void
-pl_dump_lock (char *str, int size, struct flock *flock, uint64_t owner)
+pl_dump_lock (char *str, int size, struct flock *flock,
+ uint64_t owner, void *trans)
{
char *type_str = NULL;
@@ -1202,11 +1203,12 @@ pl_dump_lock (char *str, int size, struct flock *flock, uint64_t owner)
break;
}
- snprintf (str, size, "type=%s, start=%llu, len=%llu, pid=%llu, lk-owner=%llu",
+ snprintf (str, size, "type=%s, start=%llu, len=%llu, pid=%llu, lk-owner=%llu, transport=%p",
type_str, (unsigned long long) flock->l_start,
(unsigned long long) flock->l_len,
(unsigned long long) flock->l_pid,
- (unsigned long long) owner);
+ (unsigned long long) owner,
+ trans);
}
@@ -1235,9 +1237,11 @@ __dump_entrylks (pl_inode_t *pl_inode)
gf_proc_dump_build_key(key,
"xlator.feature.locks.lock-dump.domain.entrylk",
"entrylk[%d](ACTIVE)",count );
- snprintf (tmp, 256," %s on %s",
+ snprintf (tmp, 256," %s on %s owner=%llu, transport=%p",
lock->type == ENTRYLK_RDLCK ? "ENTRYLK_RDLCK" :
- "ENTRYLK_WRLCK", lock->basename);
+ "ENTRYLK_WRLCK", lock->basename,
+ (unsigned long long) lock->owner,
+ lock->trans);
gf_proc_dump_write(key, tmp);
@@ -1298,7 +1302,8 @@ __dump_inodelks (pl_inode_t *pl_inode)
"xlator.feature.locks.lock-dump.domain.inodelk",
"inodelk[%d](ACTIVE)",count );
- pl_dump_lock (tmp, 256, &lock->user_flock, lock->owner);
+ pl_dump_lock (tmp, 256, &lock->user_flock,
+ lock->owner, lock->transport);
gf_proc_dump_write(key, tmp);
count++;
@@ -1309,7 +1314,8 @@ __dump_inodelks (pl_inode_t *pl_inode)
gf_proc_dump_build_key(key,
"xlator.feature.locks.lock-dump.domain.inodelk",
"inodelk[%d](BLOCKED)",count );
- pl_dump_lock (tmp, 256, &lock->user_flock, lock->owner);
+ pl_dump_lock (tmp, 256, &lock->user_flock,
+ lock->owner, lock->transport);
gf_proc_dump_write(key, tmp);
count++;
@@ -1346,7 +1352,8 @@ __dump_posixlks (pl_inode_t *pl_inode)
"posixlk[%d](%s)",
count,
lock->blocked ? "BLOCKED" : "ACTIVE");
- pl_dump_lock (tmp, 256, &lock->user_flock, lock->owner);
+ pl_dump_lock (tmp, 256, &lock->user_flock,
+ lock->owner, lock->transport);
gf_proc_dump_write(key, tmp);
count++;