summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client
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/protocol/client
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/protocol/client')
-rw-r--r--xlators/protocol/client/src/client.c33
1 files changed, 7 insertions, 26 deletions
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c
index c70644383..ccbc0afdc 100644
--- a/xlators/protocol/client/src/client.c
+++ b/xlators/protocol/client/src/client.c
@@ -2236,25 +2236,19 @@ client_priv_dump (xlator_t *this)
gf_proc_dump_add_section(key_prefix);
list_for_each_entry(tmp, &conf->saved_fds, sfd_pos) {
- gf_proc_dump_build_key(key, key_prefix,
- "fd.%d.remote_fd", ++i);
+ sprintf (key, "fd.%d.remote_fd", ++i);
gf_proc_dump_write(key, "%d", tmp->remote_fd);
}
- gf_proc_dump_build_key(key, key_prefix, "connecting");
- gf_proc_dump_write(key, "%d", conf->connecting);
- gf_proc_dump_build_key(key, key_prefix, "last_sent");
- gf_proc_dump_write(key, "%s", ctime(&conf->last_sent.tv_sec));
- gf_proc_dump_build_key(key, key_prefix, "last_received");
- gf_proc_dump_write(key, "%s", ctime(&conf->last_received.tv_sec));
+ gf_proc_dump_write("connecting", "%d", conf->connecting);
+ gf_proc_dump_write("last_sent", "%s", ctime(&conf->last_sent.tv_sec));
+ gf_proc_dump_write("last_received", "%s", ctime(&conf->last_received.tv_sec));
if (conf->rpc) {
- gf_proc_dump_build_key(key, key_prefix, "total_bytes_read");
- gf_proc_dump_write(key, "%"PRIu64,
+ gf_proc_dump_write("total_bytes_read", "%"PRIu64,
conf->rpc->conn.trans->total_bytes_read);
- gf_proc_dump_build_key(key, key_prefix, "total_bytes_written");
- gf_proc_dump_write(key, "%"PRIu64,
+ gf_proc_dump_write("total_bytes_written", "%"PRIu64,
conf->rpc->conn.trans->total_bytes_write);
}
pthread_mutex_unlock(&conf->lock);
@@ -2266,26 +2260,13 @@ client_priv_dump (xlator_t *this)
int32_t
client_inodectx_dump (xlator_t *this, inode_t *inode)
{
- ino_t par = 0;
- uint64_t gen = 0;
- int ret = -1;
- char key[GF_DUMP_MAX_BUF_LEN];
-
if (!inode)
return -1;
if (!this)
return -1;
- ret = inode_ctx_get2 (inode, this, &par, &gen);
-
- if (ret != 0)
- return ret;
-
- gf_proc_dump_build_key(key, "xlator.protocol.client",
- "%s.inode.%ld.par",
- this->name,inode->ino);
- gf_proc_dump_write(key, "%ld, %ld", par, gen);
+ /*TODO*/
return 0;
}