From 51d34907986fba09a560aa18238944811fc47b6a Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Fri, 2 Mar 2018 12:37:42 +0530 Subject: cluster/afr: Remove unused code paths Removed 1) afr-v1 self-heal locks related code which is not used anymore 2) transaction has some data types that are not needed, so removed them 3) Never used lock tracing available in afr as gluster's network tracing does the job. So removed that as well. 4) Changelog is always enabled and afr is always used with locks, so __changelog_enabled, afr_lock_server_count etc functions can be deleted. 5) transaction.fop/done/resume always call the same functions, so no need to have these variables. BUG: 1549606 Change-Id: I370c146fec2892d40e674d232a5d7256e003c7f1 Signed-off-by: Pranith Kumar K --- xlators/cluster/afr/src/afr-common.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'xlators/cluster/afr/src/afr-common.c') diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index d8fee88c7df..c9953139b7e 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -4594,9 +4594,6 @@ afr_priv_dump (xlator_t *this) gf_proc_dump_write("data_self_heal", "%s", priv->data_self_heal); gf_proc_dump_write("metadata_self_heal", "%d", priv->metadata_self_heal); gf_proc_dump_write("entry_self_heal", "%d", priv->entry_self_heal); - gf_proc_dump_write("data_change_log", "%d", priv->data_change_log); - gf_proc_dump_write("metadata_change_log", "%d", priv->metadata_change_log); - gf_proc_dump_write("entry-change_log", "%d", priv->entry_change_log); gf_proc_dump_write("read_child", "%d", priv->read_child); gf_proc_dump_write("wait_count", "%u", priv->wait_count); gf_proc_dump_write("heal-wait-queue-length", "%d", @@ -5324,8 +5321,7 @@ out: } int -afr_internal_lock_init (afr_internal_lock_t *lk, size_t child_count, - transaction_lk_type_t lk_type) +afr_internal_lock_init (afr_internal_lock_t *lk, size_t child_count) { int ret = -ENOMEM; @@ -5341,7 +5337,6 @@ afr_internal_lock_init (afr_internal_lock_t *lk, size_t child_count, lk->lock_op_ret = -1; lk->lock_op_errno = EUCLEAN; - lk->transaction_lk_type = lk_type; ret = 0; out: @@ -5408,8 +5403,7 @@ afr_transaction_local_init (afr_local_t *local, xlator_t *this) afr_private_t *priv = NULL; priv = this->private; - ret = afr_internal_lock_init (&local->internal_lock, priv->child_count, - AFR_TRANSACTION_LK); + ret = afr_internal_lock_init (&local->internal_lock, priv->child_count); if (ret < 0) goto out; -- cgit