diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2013-12-10 12:51:37 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-04-28 09:38:57 -0700 |
commit | b744a9cf93171cbe6c6f43c6f241888754e27fa7 (patch) | |
tree | 3978bf56c004588cdbbdc29978166a712e32d2fd /xlators/cluster/afr/src/afr-self-heal-data.c | |
parent | ba8212527e886a94b8d393172e0672c44de8457b (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-data.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-data.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c index 9de26ee569c..e5ca84292fa 100644 --- a/xlators/cluster/afr/src/afr-self-heal-data.c +++ b/xlators/cluster/afr/src/afr-self-heal-data.c @@ -1042,6 +1042,7 @@ afr_sh_data_fxattrop_fstat_done (call_frame_t *frame, xlator_t *this) afr_sh_data_setattr (frame, this, &sh->buf[tstamp_source]); } else { afr_set_data_sh_info_str (local, sh, this); + if (nsources == 0) { gf_log (this->name, GF_LOG_DEBUG, "No self-heal needed for %s", @@ -1051,7 +1052,9 @@ afr_sh_data_fxattrop_fstat_done (call_frame_t *frame, xlator_t *this) return 0; } - if (sh->do_data_self_heal && + sh->data_sh_pending = _gf_true; + + if (!sh->dry_run && sh->do_data_self_heal && afr_data_self_heal_enabled (priv->data_self_heal)) afr_sh_data_fix (frame, this); else |