From e77d7c0db17b7380b6344c7ec5835f210ed38c84 Mon Sep 17 00:00:00 2001 From: Mohammed Rafi KC Date: Fri, 30 Jun 2017 20:17:20 +0530 Subject: [PATCH 554/557] svs:implement CHILD UP notify in snapview-server protocol/server expects a child up event to successfully configure the graph. In the actual brick graph, posix is the one who decide to initiate the notification to the parent that the child is up. But in snapd graph there is no posix, hence the child up notification was missing. Ideally each xlator should initiate the child up event whenever it see's that this is the last child xlator. back port of> >Change-Id: Icccdb9fe920c265cadaf9f91c040a0831b4b78fc >BUG: 1467513 >Signed-off-by: Mohammed Rafi KC >Reviewed-on: https://review.gluster.org/17689 >CentOS-regression: Gluster Build System >Smoke: Gluster Build System >Reviewed-by: Amar Tumballi >Reviewed-by: Raghavendra Bhat Change-Id: Icccdb9fe920c265cadaf9f91c040a0831b4b78fc BUG: 1191480 Signed-off-by: Mohammed Rafi KC Reviewed-on: https://code.engineering.redhat.com/gerrit/111806 Reviewed-by: Atin Mukherjee --- xlators/features/snapview-server/src/snapview-server.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/xlators/features/snapview-server/src/snapview-server.c b/xlators/features/snapview-server/src/snapview-server.c index 72cfc90..e7c257a 100644 --- a/xlators/features/snapview-server/src/snapview-server.c +++ b/xlators/features/snapview-server/src/snapview-server.c @@ -2201,6 +2201,21 @@ out: return 0; } +int32_t +notify (xlator_t *this, int32_t event, void *data, ...) { + switch (event) { + + case GF_EVENT_PARENT_UP: + { + /* Tell the parent that snapview-server xlator is up */ + default_notify (this, GF_EVENT_CHILD_UP, data); + } + break; + default: + break; + } + return 0; +} int32_t mem_acct_init (xlator_t *this) -- 1.8.3.1