diff options
author | Jeff Darcy <jdarcy@redhat.com> | 2014-03-04 15:35:13 +0000 |
---|---|---|
committer | Jeff Darcy <jdarcy@redhat.com> | 2014-03-04 15:35:13 +0000 |
commit | 2775959b47c15e597a7974bbafa79e0882452952 (patch) | |
tree | d0b7f8f799e69884171dc06668cfafeee74e8abe /xlators/cluster/nsr-server/src/nsr.c | |
parent | 0de07f4189cbd191a765c60ed3d7c72f72112e68 (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-server/src/nsr.c')
-rw-r--r-- | xlators/cluster/nsr-server/src/nsr.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/xlators/cluster/nsr-server/src/nsr.c b/xlators/cluster/nsr-server/src/nsr.c index 9f2338148..a60589959 100644 --- a/xlators/cluster/nsr-server/src/nsr.c +++ b/xlators/cluster/nsr-server/src/nsr.c @@ -479,6 +479,25 @@ nsr_notify (xlator_t *this, int event, void *data, ...) } +int32_t +mem_acct_init (xlator_t *this) +{ + int ret = -1; + + GF_VALIDATE_OR_GOTO ("nsr", this, out); + + ret = xlator_mem_acct_init (this, gf_mt_nsr_end + 1); + + if (ret != 0) { + gf_log (this->name, GF_LOG_ERROR, + "Memory accounting init" "failed"); + return ret; + } +out: + return ret; +} + + extern void *nsr_leader_thread (void *); int32_t |