summaryrefslogtreecommitdiffstats
path: root/xlators/performance/stat-prefetch/src
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2011-09-29 12:11:44 +0530
committerVijay Bellur <vijay@gluster.com>2011-10-01 05:55:22 -0700
commit9ef8eabae21a3073f3dc09602d0680d631cbd576 (patch)
tree8474d6dd21510aad862490586c7e8ca2359b12fd /xlators/performance/stat-prefetch/src
parent161ab1b9664abf3561902c94b8748e9a95d4867c (diff)
statedump: do not print the inode number in the statedump
Since gfid is used to uniquely identify a inode, in the statedump printing inode number is not necessary. Its suffecient if the gfid of the inode is printed. And do not print the the inodelks, entrylks and posixlks if the lock count is 0. Change-Id: Idac115fbce3a5684a0f02f8f5f20b194df8fb27f BUG: 3476 Reviewed-on: http://review.gluster.com/530 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com>
Diffstat (limited to 'xlators/performance/stat-prefetch/src')
-rw-r--r--xlators/performance/stat-prefetch/src/stat-prefetch.c44
1 files changed, 12 insertions, 32 deletions
diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.c b/xlators/performance/stat-prefetch/src/stat-prefetch.c
index f8b2bcd7951..c98a2076b8c 100644
--- a/xlators/performance/stat-prefetch/src/stat-prefetch.c
+++ b/xlators/performance/stat-prefetch/src/stat-prefetch.c
@@ -4025,10 +4025,6 @@ sp_cache_traverse (void *data, void *mydata)
dump->i);
gf_proc_dump_write (key, "%s", uuidbuf);
- gf_proc_dump_build_key(key, dump->key_prefix, "entry[%d].inode.ino",
- dump->i);
- gf_proc_dump_write(key, "%ld", dirent->d_stat.ia_ino);
-
dump->i++;
out:
return;
@@ -4061,7 +4057,7 @@ sp_fdctx_dump (xlator_t *this, fd_t *fd)
"xlator.performance.stat-prefetch",
"fdctx");
gf_proc_dump_add_section (key_prefix);
-
+
gf_proc_dump_build_key (key, key_prefix, "fd");
gf_proc_dump_write (key, "%p", fd);
@@ -4076,18 +4072,15 @@ sp_fdctx_dump (xlator_t *this, fd_t *fd)
gf_proc_dump_build_key (key, key_prefix, "fd.inode.gfid");
gf_proc_dump_write (key, "%s", uuidbuf);
- gf_proc_dump_build_key (key, key_prefix, "fd.inode.ino");
- gf_proc_dump_write (key, "%ld", fd->inode->ino);
-
gf_proc_dump_build_key (key, key_prefix, "miss");
gf_proc_dump_write (key, "%lu", cache->miss);
gf_proc_dump_build_key (key, key_prefix, "hits");
gf_proc_dump_write (key, "%lu", cache->hits);
- gf_proc_dump_build_key (key, key_prefix, "cache");
+ gf_proc_dump_build_key (key, key_prefix, "cache");
dump->key_prefix = key;
-
+
rbthash_table_traverse (cache->table, sp_cache_traverse, dump);
GF_FREE (dump);
@@ -4101,7 +4094,6 @@ sp_inodectx_dump (xlator_t *this, inode_t *inode)
{
char key[GF_DUMP_MAX_BUF_LEN] = {0, };
char key_prefix[GF_DUMP_MAX_BUF_LEN] = {0, };
- char uuidbuf[256] = {0, };
sp_inode_ctx_t *inode_ctx = NULL;
call_stub_t *stub = NULL;
uint64_t value = 0;
@@ -4121,48 +4113,36 @@ sp_inodectx_dump (xlator_t *this, inode_t *inode)
}
gf_proc_dump_build_key (key_prefix,
- "xlator.performance.stat-prefetch",
+ "stat-prefetch",
"inodectx");
gf_proc_dump_add_section (key_prefix);
-
- uuid_unparse (inode->gfid, uuidbuf);
- gf_proc_dump_build_key (key, key_prefix, "inode.gfid");
- gf_proc_dump_write (key, "%s", uuidbuf);
-
- gf_proc_dump_build_key (key, key_prefix, "inode.ino");
- gf_proc_dump_write (key, "%ld", inode->ino);
LOCK (&inode_ctx->lock);
{
- gf_proc_dump_build_key (key, key_prefix, "looked_up");
- gf_proc_dump_write (key, "%s",
+ gf_proc_dump_write ("looked_up", "%s",
inode_ctx->looked_up ? "yes" : "no");
- gf_proc_dump_build_key (key, key_prefix, "lookup_in_progress");
- gf_proc_dump_write (key, "%s",
+ gf_proc_dump_write ("lookup_in_progress", "%s",
inode_ctx->lookup_in_progress ?
"yes" : "no");
- gf_proc_dump_build_key (key, key_prefix, "need_unwind");
- gf_proc_dump_write (key, "%s", inode_ctx->need_unwind ?
+ gf_proc_dump_write ("need_unwind", "%s", inode_ctx->need_unwind ?
"yes" : "no");
- gf_proc_dump_build_key (key, key_prefix, "op_ret");
- gf_proc_dump_write (key, "%d", inode_ctx->op_ret);
+ gf_proc_dump_write ("op_ret", "%d", inode_ctx->op_ret);
- gf_proc_dump_build_key (key, key_prefix, "op_errno");
- gf_proc_dump_write (key, "%d", inode_ctx->op_errno);
+ gf_proc_dump_write ("op_errno", "%d", inode_ctx->op_errno);
list_for_each_entry (stub, &inode_ctx->waiting_ops, list) {
- gf_proc_dump_build_key (key, key_prefix,
+ gf_proc_dump_build_key (key, "",
"waiting-ops[%d].frame", i);
gf_proc_dump_write (key, "%"PRId64,
stub->frame->root->unique);
- gf_proc_dump_build_key (key, key_prefix,
+ gf_proc_dump_build_key (key, "",
"waiting-ops[%d].fop", i);
gf_proc_dump_write (key, "%s", gf_fop_list[stub->fop]);
-
+
i++;
}
}