From 1bc3cd9bd59e3826fd14fc239322f039d7a814da Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Wed, 26 Jul 2017 16:17:03 +0200 Subject: changelog: add mem-pool initialization With recent changes to the mem-pool initialization, mem_pools_init_early() and mem_pools_init_late() need to be called before mem_get() is usable. This change has been tested manually with the included test from xlators/features/changelog/lib/examples/c/get-changes.c. Change-Id: I139563c4ff78a566cef2ff7e3da2ee10306def92 BUG: 1475255 Reported-by: Kotresh HR Signed-off-by: Niels de Vos Reviewed-on: https://review.gluster.org/17900 Smoke: Gluster Build System Reviewed-by: Kotresh HR CentOS-regression: Gluster Build System Reviewed-by: Jeff Darcy --- xlators/features/changelog/lib/src/gf-changelog.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'xlators/features') diff --git a/xlators/features/changelog/lib/src/gf-changelog.c b/xlators/features/changelog/lib/src/gf-changelog.c index 0e5a2c844e0..e4ad045599a 100644 --- a/xlators/features/changelog/lib/src/gf-changelog.c +++ b/xlators/features/changelog/lib/src/gf-changelog.c @@ -173,6 +173,8 @@ gf_changelog_cleanup_this (xlator_t *this) this->private = NULL; this->ctx = NULL; + + mem_pools_fini (); } static int @@ -206,7 +208,13 @@ gf_changelog_init_context () static int gf_changelog_init_master () { - return gf_changelog_init_context (); + int ret = 0; + + mem_pools_init_early (); + ret = gf_changelog_init_context (); + mem_pools_init_late (); + + return ret; } /* TODO: cleanup clnt/svc on failure */ -- cgit