summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/nsr-recon/src/recon_xlator.c
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@redhat.com>2014-03-04 15:35:13 +0000
committerJeff Darcy <jdarcy@redhat.com>2014-03-04 15:35:13 +0000
commit2775959b47c15e597a7974bbafa79e0882452952 (patch)
treed0b7f8f799e69884171dc06668cfafeee74e8abe /xlators/cluster/nsr-recon/src/recon_xlator.c
parent0de07f4189cbd191a765c60ed3d7c72f72112e68 (diff)
nsr: add mem_acct_init functions
It's not clear why this started failing after the last merge, since the mem_acct code hasn't changed for a while, but it did and having those functions is good form anyway. Also removed a bunch of GF_ASSERT(0) calls that made (and will continue to make) debugging unnecessarily painful. Change-Id: Icd89f2e23f1eaafc79cb9af06c3c9c8d2fdeec14 Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'xlators/cluster/nsr-recon/src/recon_xlator.c')
-rw-r--r--xlators/cluster/nsr-recon/src/recon_xlator.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/xlators/cluster/nsr-recon/src/recon_xlator.c b/xlators/cluster/nsr-recon/src/recon_xlator.c
index 868377bd2..c58260cf0 100644
--- a/xlators/cluster/nsr-recon/src/recon_xlator.c
+++ b/xlators/cluster/nsr-recon/src/recon_xlator.c
@@ -807,6 +807,26 @@ nsr_recon_flush (call_frame_t *frame, xlator_t *this,
return 0;
}
+
+int32_t
+mem_acct_init (xlator_t *this)
+{
+ int ret = -1;
+
+ GF_VALIDATE_OR_GOTO ("recon", this, out);
+
+ ret = xlator_mem_acct_init (this, gf_mt_recon_end + 1);
+
+ if (ret != 0) {
+ gf_log (this->name, GF_LOG_ERROR,
+ "Memory accounting init" "failed");
+ return ret;
+ }
+out:
+ return ret;
+}
+
+
int32_t
init (xlator_t *this)
{