diff options
author | Prashanth Pai <ppai@redhat.com> | 2014-03-25 16:15:15 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-04-03 21:51:50 -0700 |
commit | ca6af761fb63068b170b9e8b1143598af244e06c (patch) | |
tree | 56bfb4ee01741ad78f55abe07f8fe74a76986ee7 /xlators/features/glupy | |
parent | 997c89b6172116557f981510a94232486ec526b0 (diff) |
features/glupy: Add mem accounting support
When glusterfs is built from source using -DDEBUG flag and glupy
xlator is added to vol file, the brick process used to crash when
mounting the volume.
This fix is largely derived from the fix submitted for BZ #1035751.
Thanks to Justin Clift for helping in tracking this down.
BUG: 1035751
Change-Id: Id64f92eecc9335e34dd08812fe176774e7723c2c
Signed-off-by: Prashanth Pai <ppai@redhat.com>
Reviewed-on: http://review.gluster.org/7332
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/features/glupy')
-rw-r--r-- | xlators/features/glupy/src/glupy.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/xlators/features/glupy/src/glupy.c b/xlators/features/glupy/src/glupy.c index 948b66f8d11..7492124dd93 100644 --- a/xlators/features/glupy/src/glupy.c +++ b/xlators/features/glupy/src/glupy.c @@ -2314,6 +2314,25 @@ get_rootunique (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_glupy_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) { glupy_private_t *priv = NULL; |