summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-self-heal-entry.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-entry.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-entry.c')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-entry.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c
index 0ca06aaa382..8359079cea4 100644
--- a/xlators/cluster/afr/src/afr-self-heal-entry.c
+++ b/xlators/cluster/afr/src/afr-self-heal-entry.c
@@ -2343,7 +2343,12 @@ afr_sh_entry_fix (call_frame_t *frame, xlator_t *this,
sh->fresh_children);
heal:
- afr_sh_entry_sync_prepare (frame, this);
+ sh->entry_sh_pending = _gf_true;
+ if (sh->dry_run) {
+ afr_sh_entry_finish (frame, this);
+ } else {
+ afr_sh_entry_sync_prepare (frame, this);
+ }
out:
return;
}