Patchwork [BUG:2636,1/2] mgmt/glusterd: Fix gluster-profile performance issues

login
register
Submitter Pranith K
Date 2011-04-07 12:10:46
Message ID <1302178247-21998-1-git-send-email-pranithk@gluster.com>
Download mbox | patch
Permalink /patch/6735/
State Accepted
Headers show

Comments

Pranith K - 2011-04-07 12:10:46
From: Pranith Kumar K <pranithk@gluster.com>

Add count-fop-hits option to io-stats
use count-fop-hits instead of dump-fd-stats for profile

Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
---
 xlators/mgmt/glusterd/src/glusterd-op-sm.c  |    6 +++---
 xlators/mgmt/glusterd/src/glusterd-volgen.c |    1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

Patch

diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 970ee71..5313ad3 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -2027,7 +2027,7 @@  glusterd_is_profile_on (glusterd_volinfo_t *volinfo)
 
         GF_ASSERT (volinfo);
         latency_key = "diagnostics.latency-measurement";
-        fd_stats_key = "diagnostics.dump-fd-stats";
+        fd_stats_key = "diagnostics.count-fop-hits";
 
         ret = dict_get_str_boolean (volinfo->dict, fd_stats_key,
                                     _gf_false);
@@ -5355,7 +5355,7 @@  glusterd_add_profile_volume_options (glusterd_volinfo_t *volinfo)
         GF_ASSERT (volinfo);
 
         latency_key = "diagnostics.latency-measurement";
-        fd_stats_key = "diagnostics.dump-fd-stats";
+        fd_stats_key = "diagnostics.count-fop-hits";
 
         ret = dict_set_str (volinfo->dict, latency_key, "on");
         if (ret) {
@@ -5386,7 +5386,7 @@  glusterd_remove_profile_volume_options (glusterd_volinfo_t *volinfo)
         GF_ASSERT (volinfo);
 
         latency_key = "diagnostics.latency-measurement";
-        fd_stats_key = "diagnostics.dump-fd-stats";
+        fd_stats_key = "diagnostics.count-fop-hits";
         dict_del (volinfo->dict, latency_key);
         dict_del (volinfo->dict, fd_stats_key);
 }
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 88ab2a2..5844c7c 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -107,6 +107,7 @@  static struct volopt_map_entry glusterd_volopt_map[] = {
 
         {"diagnostics.latency-measurement",      "debug/io-stats",     NULL, NULL, NO_DOC         },
         {"diagnostics.dump-fd-stats",            "debug/io-stats",     NULL, NULL, NO_DOC        },
+        {"diagnostics.count-fop-hits",            "debug/io-stats",     NULL, NULL, NO_DOC        },
         {"diagnostics.brick-log-level",          "debug/io-stats",            "!log-level", NULL, DOC},
         {"diagnostics.client-log-level",         "debug/io-stats",            "!log-level", NULL, DOC},