summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorRahul C S <rahulcs@redhat.com>2012-03-19 15:03:09 +0530
committerVijay Bellur <vijay@gluster.com>2012-03-19 05:51:28 -0700
commitb315c42344f808bd9e2cba06bade0e5da58b0381 (patch)
tree8da603ff965e6d3565a8d02c12679d6606def401 /xlators
parenta77c4a7954df0f0e3d075895039e66eb4361562b (diff)
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 <rahulcs@redhat.com> Reviewed-on: http://review.gluster.com/2975 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/protocol/server/src/server.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
index a29caa987..519d378ac 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);