diff options
Diffstat (limited to 'xlators/features')
| -rw-r--r-- | xlators/features/changelog/src/changelog-rpc.c | 9 | ||||
| -rw-r--r-- | xlators/features/changelog/src/changelog.c | 5 | ||||
| -rw-r--r-- | xlators/features/trash/src/trash.c | 18 |
3 files changed, 27 insertions, 5 deletions
diff --git a/xlators/features/changelog/src/changelog-rpc.c b/xlators/features/changelog/src/changelog-rpc.c index 4b2b38cad51..852c0694f9a 100644 --- a/xlators/features/changelog/src/changelog-rpc.c +++ b/xlators/features/changelog/src/changelog-rpc.c @@ -258,6 +258,15 @@ changelog_handle_probe (rpcsvc_request_t *req) changelog_probe_req rpc_req = {0,}; changelog_probe_rsp rpc_rsp = {0,}; + + this = req->trans->xl; + if (this->cleanup_starting) { + gf_msg (this->name, GF_LOG_DEBUG, 0, + CHANGELOG_MSG_HANDLE_PROBE_ERROR, + "cleanup_starting flag is already set for xl"); + return 0; + } + ret = xdr_to_generic (req->msg[0], &rpc_req, (xdrproc_t)xdr_changelog_probe_req); if (ret < 0) { diff --git a/xlators/features/changelog/src/changelog.c b/xlators/features/changelog/src/changelog.c index 19d66b605bb..12997181da4 100644 --- a/xlators/features/changelog/src/changelog.c +++ b/xlators/features/changelog/src/changelog.c @@ -2894,6 +2894,7 @@ void fini (xlator_t *this) { changelog_priv_t *priv = NULL; + struct list_head queue = {0, }; priv = this->private; @@ -2901,6 +2902,10 @@ fini (xlator_t *this) /* terminate RPC server/threads */ changelog_cleanup_rpc (this, priv); + /* call barrier_disable to cancel timer */ + if (priv->barrier_enabled) + __chlog_barrier_disable (this, &queue); + /* cleanup barrier related objects */ changelog_barrier_pthread_destroy (priv); diff --git a/xlators/features/trash/src/trash.c b/xlators/features/trash/src/trash.c index e8f8b7bf051..8a92685cf4b 100644 --- a/xlators/features/trash/src/trash.c +++ b/xlators/features/trash/src/trash.c @@ -2616,16 +2616,24 @@ fini (xlator_t *this) GF_VALIDATE_OR_GOTO ("trash", this, out); priv = this->private; - inode_table = priv->trash_itable; if (priv) { - if (priv->newtrash_dir) + inode_table = priv->trash_itable; + if (priv->newtrash_dir) { GF_FREE (priv->newtrash_dir); - if (priv->oldtrash_dir) + priv->newtrash_dir = NULL; + } + if (priv->oldtrash_dir) { GF_FREE (priv->oldtrash_dir); - if (priv->brick_path) + priv->oldtrash_dir = NULL; + } + if (priv->brick_path) { GF_FREE (priv->brick_path); - if (priv->eliminate) + priv->brick_path = NULL; + } + if (priv->eliminate) { wipe_eliminate_path (&priv->eliminate); + priv->eliminate = NULL; + } if (inode_table) { inode_table_destroy (inode_table); priv->trash_itable = NULL; |
