From ecd92d42bbd9249aa637b1ad3000aa242308cb04 Mon Sep 17 00:00:00 2001 From: Mohammed Rafi KC Date: Fri, 30 Jun 2017 20:17:20 +0530 Subject: 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. 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 --- xlators/features/snapview-server/src/snapview-server.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'xlators/features') diff --git a/xlators/features/snapview-server/src/snapview-server.c b/xlators/features/snapview-server/src/snapview-server.c index 5cee414414b..22b0e1c6507 100644 --- a/xlators/features/snapview-server/src/snapview-server.c +++ b/xlators/features/snapview-server/src/snapview-server.c @@ -2180,6 +2180,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) -- cgit