diff options
Diffstat (limited to 'xlators/storage/posix/src/posix.c')
-rw-r--r-- | xlators/storage/posix/src/posix.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index b1a529bcfee..754a45aa6fb 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -6626,6 +6626,9 @@ notify (xlator_t *this, void *data, ...) { + struct posix_private *priv = NULL; + + priv = this->private; switch (event) { case GF_EVENT_PARENT_UP: @@ -6634,6 +6637,23 @@ notify (xlator_t *this, default_notify (this, GF_EVENT_CHILD_UP, data); } break; + case GF_EVENT_CLEANUP: + if (priv->health_check) { + pthread_cancel (priv->health_check); + priv->health_check = 0; + } + if (priv->janitor) { + (void) gf_thread_cleanup_xint (priv->janitor); + priv->janitor = 0; + } + if (priv->fsyncer) { + (void) gf_thread_cleanup_xint (priv->fsyncer); + priv->fsyncer = 0; + } + if (priv->mount_lock) + (void) sys_closedir (priv->mount_lock); + + break; default: /* */ break; |