From 5e50175f56d05ab6c1295b0e0f0c11695e49c277 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Thu, 15 Mar 2012 14:00:13 +0530 Subject: core: bring a cmdline option to set memory-accounting currently this is implemented as a command line option, and not as an easier translator option. this is because as of now, before even the volume files are parsed, we would need memory accounting enabled. there is scope for improving this behavior, but for now, this approach solves the problem. Also, this feature's major consumers are the testers who are looking for leaks, hence option is hidden from usage output. Change-Id: I09a5b13743ae43ff42c251989f921319e94cabe3 Signed-off-by: Amar Tumballi BUG: 799199 Reviewed-on: http://review.gluster.com/2856 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/mgmt/glusterd/src/glusterd-replace-brick.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'xlators/mgmt/glusterd/src/glusterd-replace-brick.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c index 01bc974b75f..ca127f7a8ea 100644 --- a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c +++ b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c @@ -635,6 +635,8 @@ rb_spawn_dst_brick (glusterd_volinfo_t *volinfo, priv->workdir, volinfo->volname); runner_add_arg (&runner, "--xlator-option"); runner_argprintf (&runner, "src-server.listen-port=%d", port); + if (volinfo->memory_accounting) + runner_add_arg (&runner, "--mem-accounting"); ret = runner_run (&runner); if (ret) { @@ -671,6 +673,8 @@ rb_spawn_glusterfs_client (glusterd_volinfo_t *volinfo, priv->workdir, volinfo->volname); runner_argprintf (&runner, "%s/vols/%s/"RB_CLIENT_MOUNTPOINT, priv->workdir, volinfo->volname); + if (volinfo->memory_accounting) + runner_add_arg (&runner, "--mem-accounting"); ret = runner_run (&runner); if (ret) { -- cgit