summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-rebalance.c
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendra@redhat.com>2013-03-18 12:32:35 +0530
committerAnand Avati <avati@redhat.com>2013-04-09 12:52:08 -0700
commitcf48bea3b298ea9aa35d82848a77b6bf681265d6 (patch)
tree802fa2346127234ec9619299ec6a6e9acd2dc216 /xlators/mgmt/glusterd/src/glusterd-rebalance.c
parent9c1d7cebbc62723f719b2fd0c45e0a7452e0d6be (diff)
mgmt/glusterd: enable valgrind usage even in non DEBUG build
* Till now running glusterfs processes were allowed to run in valgrind mode only when built with debug mode enabled. Change-Id: I11e07ea2a4da4f82f70cdded6258a22d65d6db64 BUG: 922877 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4688 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-rebalance.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-rebalance.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-rebalance.c b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
index 447cceffe3a..de8f39b7d91 100644
--- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c
+++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
@@ -174,9 +174,8 @@ glusterd_handle_defrag_start (glusterd_volinfo_t *volinfo, char *op_errstr,
char pidfile[PATH_MAX] = {0,};
char logfile[PATH_MAX] = {0,};
dict_t *options = NULL;
-#ifdef DEBUG
char valgrind_logfile[PATH_MAX] = {0,};
-#endif
+
priv = THIS->private;
GF_ASSERT (volinfo);
@@ -218,7 +217,7 @@ glusterd_handle_defrag_start (glusterd_volinfo_t *volinfo, char *op_errstr,
snprintf (logfile, PATH_MAX, "%s/%s-rebalance.log",
DEFAULT_LOG_FILE_DIRECTORY, volinfo->volname);
runinit (&runner);
-#ifdef DEBUG
+
if (priv->valgrind) {
snprintf (valgrind_logfile, PATH_MAX,
"%s/valgrind-%s-rebalance.log",
@@ -226,10 +225,10 @@ glusterd_handle_defrag_start (glusterd_volinfo_t *volinfo, char *op_errstr,
volinfo->volname);
runner_add_args (&runner, "valgrind", "--leak-check=full",
- "--trace-children=yes", NULL);
+ "--trace-children=yes", "--track-origins=yes",
+ NULL);
runner_argprintf (&runner, "--log-file=%s", valgrind_logfile);
}
-#endif
runner_add_args (&runner, SBIN_DIR"/glusterfs",
"-s", "localhost", "--volfile-id", volinfo->volname,