diff options
| author | Pranith Kumar K <pranithk@gluster.com> | 2010-08-13 08:15:31 +0000 | 
|---|---|---|
| committer | Anand V. Avati <avati@dev.gluster.com> | 2010-08-13 11:25:33 -0700 | 
| commit | f5137bf755542f4ea28d4fce3c659c1b9ec38647 (patch) | |
| tree | 58953b4eeed3ebfd109e81a6ca59992e45d3e86e /xlators/cluster/afr/src | |
| parent | 06c2bed16ecf38b314f5f7fce3a4459778989f03 (diff) | |
fixes for spurious entry self-heal in afr
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 974 (Spurious self-heal?)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=974
Diffstat (limited to 'xlators/cluster/afr/src')
| -rw-r--r-- | xlators/cluster/afr/src/afr-dir-read.c | 12 | ||||
| -rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-entry.c | 2 | 
2 files changed, 9 insertions, 5 deletions
diff --git a/xlators/cluster/afr/src/afr-dir-read.c b/xlators/cluster/afr/src/afr-dir-read.c index a9b44579b13..4fac4775465 100644 --- a/xlators/cluster/afr/src/afr-dir-read.c +++ b/xlators/cluster/afr/src/afr-dir-read.c @@ -68,7 +68,8 @@ afr_examine_dir_sh_unwind (call_frame_t *frame, xlator_t *this)  gf_boolean_t -__checksums_differ (uint32_t *checksum, int child_count) +__checksums_differ (uint32_t *checksum, int child_count, +                    unsigned char *child_up)  {          int ret = _gf_false;          int i = 0; @@ -77,14 +78,16 @@ __checksums_differ (uint32_t *checksum, int child_count)          cksum = checksum[0]; -        while (i < child_count) { +        for (i = 0; i < child_count; i++) { +                if (!child_up[i]) +                        continue; +                  if (cksum != checksum[i]) {                          ret = _gf_true;                          break;                  }                  cksum = checksum[i]; -                i++;          }          return ret; @@ -149,7 +152,8 @@ out:                  if (call_count == 0) {                          if (__checksums_differ (local->cont.opendir.checksum, -                                                priv->child_count)) { +                                                priv->child_count, +                                                local->child_up)) {                                  sh->need_entry_self_heal  = _gf_true;                                  sh->forced_merge          = _gf_true; diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c index a6e67641ce9..73535dddd2a 100644 --- a/xlators/cluster/afr/src/afr-self-heal-entry.c +++ b/xlators/cluster/afr/src/afr-self-heal-entry.c @@ -614,7 +614,7 @@ afr_sh_entry_expunge_mkdir_cbk (call_frame_t *expunge_frame, void *cookie, xlato  	frame         = expunge_sh->sh_frame;          if (op_ret != 0) { -                gf_log (this->name, GF_LOG_DEBUG, +                gf_log (this->name, GF_LOG_ERROR,                          "mkdir of /" GF_REPLICATE_TRASH_DIR " failed on %s",                          priv->children[active_src]->name);  | 
