From b315c42344f808bd9e2cba06bade0e5da58b0381 Mon Sep 17 00:00:00 2001 From: Rahul C S Date: Mon, 19 Mar 2012 15:03:09 +0530 Subject: print bound_xl only once in server statedump since, currently there is only one bound_xl for all connection objects, it does not make sense to print the bound_xl for every conn object. Change-Id: Iaf4a170fe63fb7e80133c449a20f298f0e86364c BUG: 765495 Signed-off-by: Rahul C S Reviewed-on: http://review.gluster.com/2975 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/protocol/server/src/server.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c index a29caa987f8..519d378ac09 100644 --- a/xlators/protocol/server/src/server.c +++ b/xlators/protocol/server/src/server.c @@ -436,6 +436,7 @@ server_inode (xlator_t *this) char key[GF_DUMP_MAX_BUF_LEN]; int i = 1; int ret = -1; + xlator_t *prev_bound_xl = NULL; GF_VALIDATE_OR_GOTO ("server", this, out); @@ -455,6 +456,17 @@ server_inode (xlator_t *this) list_for_each_entry (trav, &conf->conns, list) { if (trav->bound_xl && trav->bound_xl->itable) { + /* Presently every brick contains only one + * bound_xl for all connections. This will lead + * to duplicating of the inode lists, if listing + * is done for every connection. This simple check + * prevents duplication in the present case. If + * need arises the check can be improved. + */ + if (trav->bound_xl == prev_bound_xl) + continue; + prev_bound_xl = trav->bound_xl; + gf_proc_dump_build_key(key, "conn","%d.bound_xl.%s", i, trav->bound_xl->name); -- cgit