summaryrefslogtreecommitdiffstats
path: root/xlators/features/changelog/lib/examples/c/get-changes-multi.c
diff options
context:
space:
mode:
authorVenky Shankar <vshankar@redhat.com>2015-03-21 19:59:45 +0530
committerVijay Bellur <vbellur@redhat.com>2015-03-24 06:32:39 -0700
commit470d5c4af7f85809997a77af187c8f430b0354c8 (patch)
tree38ff73b3ceb39d55b883def3a241f7755d939d53 /xlators/features/changelog/lib/examples/c/get-changes-multi.c
parent9c9f3f368c693b1cf5f67f3d8d4e599d4ba61383 (diff)
libgfchangelog: cleanups on disconnection
[WIP patch as of now, just needs a little tweak] A pending TODO in the code caused regressions to fail as bitrot daemons are spawned during volume start (equivalent to enabling bitrot by default). The problematic part that casued such failures is during brick disconnections with unsafe handling of event data structured in the code. With this patch, data structures are properly cleaned up with care taken to cleanup all accessors first. This also fixes potential memory leaks which was bluntly ignored before. Change-Id: I70ed82cb1a0fb56c85ef390007e321a97a35c5ce BUG: 1170075 Signed-off-by: Venky Shankar <vshankar@redhat.com> original-author: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/9959 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/features/changelog/lib/examples/c/get-changes-multi.c')
-rw-r--r--xlators/features/changelog/lib/examples/c/get-changes-multi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/features/changelog/lib/examples/c/get-changes-multi.c b/xlators/features/changelog/lib/examples/c/get-changes-multi.c
index ae404bc7ad6..3741bdf6edc 100644
--- a/xlators/features/changelog/lib/examples/c/get-changes-multi.c
+++ b/xlators/features/changelog/lib/examples/c/get-changes-multi.c
@@ -44,7 +44,7 @@ void brick_callback (void *xl, char *brick,
void fill_brick_spec (struct gf_brick_spec *brick, char *path)
{
brick->brick_path = strdup (path);
- brick->filter = CHANGELOG_OP_TYPE_RELEASE;
+ brick->filter = CHANGELOG_OP_TYPE_BR_RELEASE;
brick->init = brick_init;
brick->fini = brick_fini;
@@ -75,7 +75,7 @@ main (int argc, char **argv)
goto error_return;
ret = gf_changelog_register_generic ((struct gf_brick_spec *)bricks, 2,
- 1, "/tmp/multi-changes.log", 9,
+ 0, "/tmp/multi-changes.log", 9,
NULL);
if (ret)
goto error_return;