From 94d232ec8ab0dbbda643039fb3e41495cae5e7e9 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Wed, 8 Sep 2010 03:59:50 +0000 Subject: protocol/client: send CHILD_UP directly fuse if parent is NULL Signed-off-by: Amar Tumballi Signed-off-by: Vijay Bellur BUG: 1568 (Fuse init doesn't happen when vol file is changed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1568 --- xlators/protocol/client/src/client-handshake.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c index 01c68e027b5..d94cb774c87 100644 --- a/xlators/protocol/client/src/client-handshake.c +++ b/xlators/protocol/client/src/client-handshake.c @@ -364,8 +364,15 @@ client_post_handshake (call_frame_t *frame, xlator_t *this) protocol_client_reopen (this, fdctx); } - parent = this->parents; + /* As fuse is not 'parent' of any translator now, triggering its + CHILD_UP event is hacky in case client has only client protocol */ + if (!this->parents && this->ctx && this->ctx->master) { + /* send notify to 'ctx->master' if it exists */ + xlator_notify (this->ctx->master, GF_EVENT_CHILD_UP, + this->graph); + } + parent = this->parents; while (parent) { xlator_notify (parent->xlator, GF_EVENT_CHILD_UP, this); -- cgit