summaryrefslogtreecommitdiffstats
path: root/xlators/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/protocol')
-rw-r--r--xlators/protocol/client/src/client.c33
-rw-r--r--xlators/protocol/server/src/server.c15
2 files changed, 12 insertions, 36 deletions
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c
index c7064438352..ccbc0afdc38 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;
}
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
index 3b1f46ad397..e9f2818200f 100644
--- a/xlators/protocol/server/src/server.c
+++ b/xlators/protocol/server/src/server.c
@@ -189,24 +189,20 @@ server_fd (xlator_t *this)
list_for_each_entry (trav, &conf->conns, list) {
if (trav->id) {
gf_proc_dump_build_key(key,
- "xlator.protocol.server.conn",
- "%d.id", i);
+ "conn","%d.id", i);
gf_proc_dump_write(key, "%s", trav->id);
}
- gf_proc_dump_build_key(key,"xlator.protocol.server.conn",
- "%d.ref",i)
+ gf_proc_dump_build_key(key,"conn","%d.ref",i)
gf_proc_dump_write(key, "%d", trav->ref);
if (trav->bound_xl) {
gf_proc_dump_build_key(key,
- "xlator.protocol.server.conn",
- "%d.bound_xl", i);
+ "conn","%d.bound_xl", i);
gf_proc_dump_write(key, "%s", trav->bound_xl->name);
}
gf_proc_dump_build_key(key,
- "xlator.protocol.server.conn",
- "%d.id", i);
+ "conn","%d.id", i);
fdtable_dump(trav->fdtable,key);
i++;
}
@@ -277,8 +273,7 @@ server_inode (xlator_t *this)
list_for_each_entry (trav, &conf->conns, list) {
if (trav->bound_xl && trav->bound_xl->itable) {
gf_proc_dump_build_key(key,
- "xlator.protocol.server.conn",
- "%d.bound_xl.%s",
+ "conn","%d.bound_xl.%s",
i, trav->bound_xl->name);
inode_table_dump(trav->bound_xl->itable,key);
i++;