summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/globals.c
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendra@redhat.com>2015-01-20 17:57:22 +0530
committerVijay Bellur <vbellur@redhat.com>2015-01-28 06:05:24 -0800
commitc8a6904396142b832ec31c37f43f44b139d24e1f (patch)
tree897a2ba419752dab93b8b138485914585cbac163 /libglusterfs/src/globals.c
parent2f640b3f3ce21c6790c661f53ff39474192b5a21 (diff)
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 <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/9469 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'libglusterfs/src/globals.c')
-rw-r--r--libglusterfs/src/globals.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libglusterfs/src/globals.c b/libglusterfs/src/globals.c
index 259c5c885f7..cf707c7af4b 100644
--- a/libglusterfs/src/globals.c
+++ b/libglusterfs/src/globals.c
@@ -81,8 +81,22 @@ static pthread_key_t uuid_buf_key;
static char global_uuid_buf[GF_UUID_BUF_SIZE];
static pthread_key_t lkowner_buf_key;
static char global_lkowner_buf[GF_LKOWNER_BUF_SIZE];
+static int gf_global_mem_acct_enable = 1;
+int
+gf_global_mem_acct_enable_get (void)
+{
+ return gf_global_mem_acct_enable;
+}
+
+int
+gf_global_mem_acct_enable_set (int val)
+{
+ gf_global_mem_acct_enable = val;
+ return 0;
+}
+
void
glusterfs_this_destroy (void *ptr)
{