summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-self-heal-common.c
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2013-12-10 12:51:37 +0530
committerVijay Bellur <vbellur@redhat.com>2014-04-28 09:38:57 -0700
commitb744a9cf93171cbe6c6f43c6f241888754e27fa7 (patch)
tree3978bf56c004588cdbbdc29978166a712e32d2fd /xlators/cluster/afr/src/afr-self-heal-common.c
parentba8212527e886a94b8d393172e0672c44de8457b (diff)
cluster/afr: Add dry-run functionality to self-heal.
This will be useful in figuring out if a file needs self-heal or not with certainity for data-self-heal Change-Id: Idf98a68e69f2c35646ef2e7c97302586fe1dc07d BUG: 1039544 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/6510 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-common.c')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c
index df537086e62..6f82761b33d 100644
--- a/xlators/cluster/afr/src/afr-self-heal-common.c
+++ b/xlators/cluster/afr/src/afr-self-heal-common.c
@@ -2260,6 +2260,7 @@ afr_self_heal_local_init (afr_local_t *l, xlator_t *this)
shc->unwind = sh->unwind;
shc->gfid_sh_success_cbk = sh->gfid_sh_success_cbk;
+ shc->dry_run = sh->dry_run;
shc->do_missing_entry_self_heal = sh->do_missing_entry_self_heal;
shc->do_gfid_self_heal = sh->do_gfid_self_heal;
shc->do_data_self_heal = sh->do_data_self_heal;
@@ -2352,6 +2353,9 @@ afr_self_heal_completion_cbk (call_frame_t *bgsh_frame, xlator_t *this)
orig_frame_local = sh->orig_frame->local;
orig_frame_sh = &orig_frame_local->self_heal;
orig_frame_sh->actual_sh_started = _gf_true;
+ orig_frame_sh->entry_sh_pending = sh->entry_sh_pending;
+ orig_frame_sh->data_sh_pending = sh->data_sh_pending;
+ orig_frame_sh->metadata_sh_pending = sh->metadata_sh_pending;
sh->unwind (sh->orig_frame, this, sh->op_ret, sh->op_errno,
is_self_heal_failed (sh, AFR_CHECK_ALL));
}