summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2014-07-05 07:09:00 +0530
committerVijay Bellur <vbellur@redhat.com>2014-07-06 21:21:58 -0700
commit2c5eb5c708134218bf756cffeb5167bd03499028 (patch)
tree8a581bfaf5404fca01fe7b3ff961822f3f1bd93d
parent8202705f98d139ef7d691587b9f68cf1db2e397a (diff)
statedump: Don't print mem-type numbers
Change-Id: I381bfa9535fe60c37758761d34b98dbbc4e5f569 BUG: 1114188 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/8239 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com> Tested-by: Justin Clift <justin@gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r--libglusterfs/src/statedump.c6
-rwxr-xr-xtests/bugs/bug-834465.t6
2 files changed, 6 insertions, 6 deletions
diff --git a/libglusterfs/src/statedump.c b/libglusterfs/src/statedump.c
index 134dbd4f8f5..46008178581 100644
--- a/libglusterfs/src/statedump.c
+++ b/libglusterfs/src/statedump.c
@@ -236,9 +236,9 @@ gf_proc_dump_xlator_mem_info (xlator_t *xl)
sizeof (struct mem_acct))))
continue;
- gf_proc_dump_add_section ("%s.%s - usage-type %d memusage",
- xl->type, xl->name, i);
- gf_proc_dump_write ("type", "%s", xl->mem_acct.rec[i].typestr);
+ gf_proc_dump_add_section ("%s.%s - usage-type %s memusage",
+ xl->type, xl->name,
+ xl->mem_acct.rec[i].typestr);
gf_proc_dump_write ("size", "%u", xl->mem_acct.rec[i].size);
gf_proc_dump_write ("num_allocs", "%u",
xl->mem_acct.rec[i].num_allocs);
diff --git a/tests/bugs/bug-834465.t b/tests/bugs/bug-834465.t
index 7e2cf27e44d..7bbf1a32aa2 100755
--- a/tests/bugs/bug-834465.t
+++ b/tests/bugs/bug-834465.t
@@ -20,10 +20,10 @@ TEST glusterfs --mem-accounting --volfile-server=$H0 --volfile-id=$V0 $MOUNTDIR;
sdump1=$(generate_mount_statedump $V0);
nalloc1=0
-grep -A3 "fuse - usage-type 85" $sdump1
+grep -A3 "fuse - usage-type gf_common_mt_fd_lk_ctx_node_t" $sdump1
if [ $? -eq '0' ]
then
- nalloc1=`grep -A3 "fuse - usage-type 85" $sdump1 | grep num_allocs | cut -d '=' -f2`
+ nalloc1=`grep -A3 "fuse - usage-type gf_common_mt_fd_lk_ctx_node_t" $sdump1 | grep num_allocs | cut -d '=' -f2`
fi
build_tester $(dirname $0)/bug-834465.c
@@ -31,7 +31,7 @@ build_tester $(dirname $0)/bug-834465.c
TEST $(dirname $0)/bug-834465 $M0/testfile
sdump2=$(generate_mount_statedump $V0);
-nalloc2=`grep -A3 "fuse - usage-type 85" $sdump2 | grep num_allocs | cut -d '=' -f2`
+nalloc2=`grep -A3 "fuse - usage-type gf_common_mt_fd_lk_ctx_node_t" $sdump2 | grep num_allocs | cut -d '=' -f2`
TEST [ $nalloc1 -eq $nalloc2 ];