From c8a6904396142b832ec31c37f43f44b139d24e1f Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Tue, 20 Jan 2015 17:57:22 +0530 Subject: uss: disable memory accounting for the snapshot daemon * Bring in option to disable memory accounting for a glusterfs process This reverses the changes done by the commit 7fba3a88f1ced610eca0c23516a1e720d75160cd. * Change the key from "memory-accounting" to "no-memory-accounting", as by default all the glusterfs process enable memory accounting now. So to disable memory accounting for some process, "no-mem-accounting" argument has to be passed. Change-Id: I39c7cefb0fe764ea3e48f4e73e1305b084c5f497 BUG: 1184366 Signed-off-by: Raghavendra Bhat Reviewed-on: http://review.gluster.org/9469 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- api/src/glfs-mgmt.c | 2 +- api/src/glfs.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'api/src') diff --git a/api/src/glfs-mgmt.c b/api/src/glfs-mgmt.c index 1cba1ed1109..86a186e581b 100644 --- a/api/src/glfs-mgmt.c +++ b/api/src/glfs-mgmt.c @@ -820,7 +820,7 @@ glfs_mgmt_init (struct glfs *fs) if (ret) goto out; - rpc = rpc_clnt_new (options, THIS->ctx, THIS->name, 8); + rpc = rpc_clnt_new (options, ctx, THIS->name, 8); if (!rpc) { ret = -1; gf_log (THIS->name, GF_LOG_WARNING, diff --git a/api/src/glfs.c b/api/src/glfs.c index 75dd315f6bd..7542d8b9fcd 100644 --- a/api/src/glfs.c +++ b/api/src/glfs.c @@ -563,7 +563,8 @@ pub_glfs_new (const char *volname) if (ret) return NULL; - THIS->ctx = ctx; + if (!THIS->ctx) + THIS->ctx = ctx; /* then ctx_defaults_init, for xlator_mem_acct_init(THIS) */ ret = glusterfs_ctx_defaults_init (ctx); -- cgit