summaryrefslogtreecommitdiffstats
path: root/xlators/features/compress/src/cdc.c
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2014-03-23 08:01:15 +0530
committerVijay Bellur <vbellur@redhat.com>2014-03-24 11:08:27 -0700
commit00802b3a484499267af2e4474d75d3f75887ad07 (patch)
tree4cc63cebf4f8c6fe989ab662fe6b0858b086244a /xlators/features/compress/src/cdc.c
parentf7a815a2d0e7e9d7ed1ec2da587790bd3ddda9e5 (diff)
features/compress: Add mem accounting support for compress
Change-Id: I89a7a4cd64ef65ad3bab180d66797a62b4e1e195 BUG: 923540 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/7320 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/features/compress/src/cdc.c')
-rw-r--r--xlators/features/compress/src/cdc.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/xlators/features/compress/src/cdc.c b/xlators/features/compress/src/cdc.c
index a334c7e061c..67fc52505e5 100644
--- a/xlators/features/compress/src/cdc.c
+++ b/xlators/features/compress/src/cdc.c
@@ -190,6 +190,25 @@ cdc_writev (call_frame_t *frame,
}
int32_t
+mem_acct_init (xlator_t *this)
+{
+ int ret = -1;
+
+ if (!this)
+ return ret;
+
+ ret = xlator_mem_acct_init (this, gf_cdc_mt_end);
+
+ if (ret != 0) {
+ gf_log(this->name, GF_LOG_ERROR, "Memory accounting init"
+ "failed");
+ return ret;
+ }
+
+ return ret;
+}
+
+int32_t
init (xlator_t *this)
{
int ret = -1;