diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2011-11-04 19:10:11 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-11-04 09:54:01 -0700 |
commit | f356095377db83864c56f0bf86a8bf30563ed776 (patch) | |
tree | ebe807b599fdf48168f5f615d658de9dbad92f00 /xlators/cluster/afr/src/afr-self-heal-entry.c | |
parent | 68fa84827120558a80f132da6918490885611a19 (diff) |
dht,afr: Fixed gfid problems
*) removed uuid_generate usage in pump and afr
*) filled the gfids for the fops which were sending no gfid in loc
Change-Id: Id6780da76c3ae18ae5130368b687ea026e338ac0
BUG: 3760
Reviewed-on: http://review.gluster.com/673
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-entry.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-entry.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c index 21b248f496c..16dd46d2ee1 100644 --- a/xlators/cluster/afr/src/afr-self-heal-entry.c +++ b/xlators/cluster/afr/src/afr-self-heal-entry.c @@ -177,6 +177,11 @@ afr_sh_entry_erase_pending (call_frame_t *frame, xlator_t *this) sh = &local->self_heal; priv = this->private; + if (sh->entries_skipped) { + need_unwind = 1; + sh->op_failed = _gf_true; + goto out; + } afr_sh_pending_to_delta (priv, sh->xattr, sh->delta_matrix, sh->success, priv->child_count, AFR_ENTRY_TRANSACTION); @@ -224,6 +229,7 @@ afr_sh_entry_erase_pending (call_frame_t *frame, xlator_t *this) } GF_FREE (erase_xattr); +out: if (need_unwind) afr_sh_entry_finish (frame, this); @@ -723,7 +729,8 @@ afr_sh_entry_expunge_entry (call_frame_t *frame, xlator_t *this, expunge_sh->active_source = active_src; expunge_sh->entrybuf = entry->d_stat; - ret = afr_build_child_loc (this, &expunge_local->loc, &local->loc, name); + ret = afr_build_child_loc (this, &expunge_local->loc, &local->loc, + name, entry->d_stat.ia_gfid); if (ret != 0) { op_errno = EINVAL; goto out; @@ -1727,8 +1734,13 @@ afr_sh_entry_common_lookup_done (call_frame_t *impunge_frame, xlator_t *this, afr_update_gfid_from_iatts (gfid, impunge_sh->buf, impunge_sh->child_success, priv->child_count); - if (uuid_is_null (gfid)) - uuid_generate (gfid); + if (uuid_is_null (gfid)) { + sh->entries_skipped = _gf_true; + gf_log (this->name, GF_LOG_INFO, "%s: Skipping entry " + "self-heal because of gfid absence", + impunge_local->loc.path); + goto done; + } afr_sh_common_lookup (impunge_frame, this, &impunge_local->loc, afr_sh_entry_common_lookup_done, gfid, AFR_LOOKUP_FAIL_CONFLICTS | @@ -1799,7 +1811,7 @@ afr_sh_entry_impunge_entry (call_frame_t *frame, xlator_t *this, impunge_local = impunge_frame->local; ret = afr_build_child_loc (this, &impunge_local->loc, &local->loc, - entry->d_name); + entry->d_name, entry->d_stat.ia_gfid); if (ret != 0) { op_errno = ENOMEM; goto out; |