diff options
author | Amar Tumballi <amar@gluster.com> | 2010-08-27 09:28:37 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-08-27 10:43:10 -0700 |
commit | fdc016fabed01e8497ffe281d7f35708b0eb25cd (patch) | |
tree | 1143b0f60ca006a74473de2179b4daf484c53d33 /libglusterfs/src | |
parent | 18482a0d744a222fba6e235a1c6f2c30e27e8c03 (diff) |
fix notify mechanism to send CHILD_UP to fuse
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
Diffstat (limited to 'libglusterfs/src')
-rw-r--r-- | libglusterfs/src/defaults.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/libglusterfs/src/defaults.c b/libglusterfs/src/defaults.c index f5431d471..f5317cf86 100644 --- a/libglusterfs/src/defaults.c +++ b/libglusterfs/src/defaults.c @@ -1236,8 +1236,22 @@ default_notify (xlator_t *this, int32_t event, void *data, ...) } } break; - case GF_EVENT_CHILD_DOWN: case GF_EVENT_CHILD_UP: + { + xlator_list_t *parent = this->parents; + /* Handle the case of CHILD_UP specially, send it to fuse */ + if (!parent && this->ctx && this->ctx->master) + xlator_notify (this->ctx->master, event, this->graph, NULL); + + while (parent) { + if (parent->xlator->init_succeeded) + xlator_notify (parent->xlator, event, + this, NULL); + parent = parent->next; + } + } + break; + case GF_EVENT_CHILD_DOWN: default: { xlator_list_t *parent = this->parents; |