summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src/posix-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/storage/posix/src/posix-common.c')
-rw-r--r--xlators/storage/posix/src/posix-common.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix-common.c b/xlators/storage/posix/src/posix-common.c
index 9c9d52e3609..03cb532e2c5 100644
--- a/xlators/storage/posix/src/posix-common.c
+++ b/xlators/storage/posix/src/posix-common.c
@@ -143,11 +143,21 @@ posix_inode(xlator_t *this)
int32_t
posix_notify(xlator_t *this, int32_t event, void *data, ...)
{
+ xlator_t *victim = data;
+
switch (event) {
case GF_EVENT_PARENT_UP: {
/* Tell the parent that posix xlator is up */
default_notify(this, GF_EVENT_CHILD_UP, data);
} break;
+
+ case GF_EVENT_PARENT_DOWN: {
+ if (!victim->cleanup_starting)
+ break;
+ gf_log(this->name, GF_LOG_INFO, "Sending CHILD_DOWN for brick %s",
+ victim->name);
+ default_notify(this->parents->xlator, GF_EVENT_CHILD_DOWN, data);
+ } break;
default:
/* */
break;