summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorMohammed Rafi KC <rkavunga@redhat.com>2017-06-30 20:17:20 +0530
committerAtin Mukherjee <amukherj@redhat.com>2017-07-09 04:57:31 +0000
commitecd92d42bbd9249aa637b1ad3000aa242308cb04 (patch)
tree695302c8cbe2c73c9b3572ed17f7fac742b7483e /xlators
parent028d82b8a2434cb6d5ad707500f6dea2125ea2fa (diff)
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 <rkavunga@redhat.com> Reviewed-on: https://review.gluster.org/17689 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/features/snapview-server/src/snapview-server.c15
1 files changed, 15 insertions, 0 deletions
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)