diff options
Diffstat (limited to 'xlators/cluster/nsr-client/src/nsrc.c')
-rw-r--r-- | xlators/cluster/nsr-client/src/nsrc.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/xlators/cluster/nsr-client/src/nsrc.c b/xlators/cluster/nsr-client/src/nsrc.c index eed824599..4551a1432 100644 --- a/xlators/cluster/nsr-client/src/nsrc.c +++ b/xlators/cluster/nsr-client/src/nsrc.c @@ -27,6 +27,7 @@ enum gf_dht_mem_types_ { gf_mt_nsrc_private_t = gf_common_mt_end + 1, + gf_mt_nsrc_end }; typedef struct { @@ -150,6 +151,26 @@ struct xlator_fops fops = { struct xlator_cbks cbks = { }; + +int32_t +mem_acct_init (xlator_t *this) +{ + int ret = -1; + + GF_VALIDATE_OR_GOTO ("nsrc", this, out); + + ret = xlator_mem_acct_init (this, gf_mt_nsrc_end + 1); + + if (ret != 0) { + gf_log (this->name, GF_LOG_ERROR, + "Memory accounting init" "failed"); + return ret; + } +out: + return ret; +} + + int32_t nsrc_init (xlator_t *this) { @@ -185,7 +206,7 @@ nsrc_fini (xlator_t *this) } int32_t -nsrc_notify (xlator_t *this, int32_t event, void *data, void *data2) +nsrc_notify (xlator_t *this, int32_t event, void *data, ...) { int32_t ret = 0; |