summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/statedump.c
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2010-09-16 04:04:58 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-16 06:38:38 -0700
commit279fbb6f71f36b90480f19e5a98d0b1d27215733 (patch)
tree86801a1c9c37bd303433991595064a2e24ec4a55 /libglusterfs/src/statedump.c
parent27d45ce245376cb012b0dd80dee6ccb26cc12645 (diff)
performance/write-behind: dump contents of wb-file
Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1059 (enhancements for getting statistics from performance translators) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1059
Diffstat (limited to 'libglusterfs/src/statedump.c')
-rw-r--r--libglusterfs/src/statedump.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/libglusterfs/src/statedump.c b/libglusterfs/src/statedump.c
index 230e7c2ef30..55832d2c802 100644
--- a/libglusterfs/src/statedump.c
+++ b/libglusterfs/src/statedump.c
@@ -39,7 +39,7 @@ extern xlator_t global_xlator;
static pthread_mutex_t gf_proc_dump_mutex;
static int gf_dump_fd = -1;
-static gf_dump_options_t dump_options;
+gf_dump_options_t dump_options;
static void
@@ -292,6 +292,10 @@ gf_proc_dump_parse_set_option (char *key, char *value)
opt_key = &dump_options.xl_options.dump_fd;
} else if (!strncasecmp (key, "inode", 5)) {
opt_key = &dump_options.xl_options.dump_inode;
+ } else if (!strncasecmp (key, "inodectx", strlen ("inodectx"))) {
+ opt_key = &dump_options.xl_options.dump_inodectx;
+ } else if (!strncasecmp (key, "fdctx", strlen ("fdctx"))) {
+ opt_key = &dump_options.xl_options.dump_fdctx;
}
if (!opt_key) {
@@ -322,6 +326,9 @@ gf_proc_dump_enable_all_options ()
GF_PROC_DUMP_SET_OPTION (dump_options.xl_options.dump_priv, _gf_true);
GF_PROC_DUMP_SET_OPTION (dump_options.xl_options.dump_inode, _gf_true);
GF_PROC_DUMP_SET_OPTION (dump_options.xl_options.dump_fd, _gf_true);
+ GF_PROC_DUMP_SET_OPTION (dump_options.xl_options.dump_inodectx,
+ _gf_true);
+ GF_PROC_DUMP_SET_OPTION (dump_options.xl_options.dump_fdctx, _gf_true);
return 0;
}
@@ -337,6 +344,9 @@ gf_proc_dump_disable_all_options ()
GF_PROC_DUMP_SET_OPTION (dump_options.xl_options.dump_inode,
_gf_false);
GF_PROC_DUMP_SET_OPTION (dump_options.xl_options.dump_fd, _gf_false);
+ GF_PROC_DUMP_SET_OPTION (dump_options.xl_options.dump_inodectx,
+ _gf_false);
+ GF_PROC_DUMP_SET_OPTION (dump_options.xl_options.dump_fdctx, _gf_false);
return 0;
}