diff options
author | Niels de Vos <ndevos@redhat.com> | 2017-07-30 09:14:22 +0200 |
---|---|---|
committer | Shyamsundar Ranganathan <srangana@redhat.com> | 2017-07-31 16:32:30 +0000 |
commit | bb4571f72c0e794f7c3da8c2f64ed20906cfa2fe (patch) | |
tree | d11851b0f37c1e41c08ae472826465b359436206 /xlators/features | |
parent | c2742e4dd118e416fbd7fdf865350a5a3c92490c (diff) |
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.
Cherry picked from commit 1bc3cd9bd59e3826fd14fc239322f039d7a814da)
> Change-Id: I139563c4ff78a566cef2ff7e3da2ee10306def92
> BUG: 1475255
> Reported-by: Kotresh HR <khiremat@redhat.com>
> Signed-off-by: Niels de Vos <ndevos@redhat.com>
> Reviewed-on: https://review.gluster.org/17900
> Smoke: Gluster Build System <jenkins@build.gluster.org>
> Reviewed-by: Kotresh HR <khiremat@redhat.com>
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
Change-Id: I139563c4ff78a566cef2ff7e3da2ee10306def92
BUG: 1475258
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: https://review.gluster.org/17916
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Diffstat (limited to 'xlators/features')
-rw-r--r-- | xlators/features/changelog/lib/src/gf-changelog.c | 10 |
1 files changed, 9 insertions, 1 deletions
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 */ |