diff options
Diffstat (limited to 'xlators/features/compress')
-rw-r--r-- | xlators/features/compress/src/cdc-mem-types.h | 1 | ||||
-rw-r--r-- | xlators/features/compress/src/cdc.c | 19 |
2 files changed, 20 insertions, 0 deletions
diff --git a/xlators/features/compress/src/cdc-mem-types.h b/xlators/features/compress/src/cdc-mem-types.h index efa00805987..ead2c70ba6e 100644 --- a/xlators/features/compress/src/cdc-mem-types.h +++ b/xlators/features/compress/src/cdc-mem-types.h @@ -17,6 +17,7 @@ enum gf_cdc_mem_types { gf_cdc_mt_priv_t = gf_common_mt_end + 1, gf_cdc_mt_vec_t = gf_common_mt_end + 2, gf_cdc_mt_gzip_trailer_t = gf_common_mt_end + 3, + gf_cdc_mt_end = gf_common_mt_end + 4, }; #endif 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; |