diff options
author | Pranith K <pranithk@gluster.com> | 2011-07-14 06:30:20 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-10-19 02:28:02 -0700 |
commit | 94943e213a61c83481308dba6adc6b23c3581d2e (patch) | |
tree | a1664c9d3e16d6278d996f4f8c148ffcef39acf6 /xlators/cluster/afr/src/afr-self-heal-metadata.c | |
parent | 449f31c8ae8f1e6df787cfc1d1203ba7f0312cb6 (diff) |
cluster/afr: Fix conflict files and gfids
Change-Id: I771045aca9f9a811744aeec0d844609a37ae4792
BUG: 3734
Reviewed-on: http://review.gluster.com/611
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-metadata.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-metadata.c | 61 |
1 files changed, 2 insertions, 59 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-metadata.c b/xlators/cluster/afr/src/afr-self-heal-metadata.c index 1214eefe2..03b91dae3 100644 --- a/xlators/cluster/afr/src/afr-self-heal-metadata.c +++ b/xlators/cluster/afr/src/afr-self-heal-metadata.c @@ -604,64 +604,6 @@ afr_sh_metadata_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this, return 0; } - -int -afr_sh_metadata_lookup (call_frame_t *frame, xlator_t *this) -{ - afr_local_t *local = NULL; - afr_private_t *priv = NULL; - int i = 0; - int call_count = 0; - dict_t *xattr_req = NULL; - int ret = 0; - afr_self_heal_t *sh = NULL; - - local = frame->local; - priv = this->private; - sh = &local->self_heal; - - call_count = afr_up_children_count (priv->child_count, - local->child_up); - local->call_count = call_count; - - xattr_req = dict_new(); - - if (xattr_req) { - for (i = 0; i < priv->child_count; i++) { - ret = dict_set_uint64 (xattr_req, - priv->pending_key[i], - 3 * sizeof(int32_t)); - if (ret < 0) - gf_log (this->name, GF_LOG_WARNING, - "Unable to set dict value."); - } - } - - for (i = 0; i < priv->child_count; i++) - sh->child_success[i] = -1; - sh->success_count = 0; - for (i = 0; i < priv->child_count; i++) { - if (local->child_up[i]) { - gf_log (this->name, GF_LOG_TRACE, - "looking up %s on %s", - local->loc.path, priv->children[i]->name); - - STACK_WIND_COOKIE (frame, afr_sh_metadata_lookup_cbk, - (void *) (long) i, - priv->children[i], - priv->children[i]->fops->lookup, - &local->loc, xattr_req); - if (!--call_count) - break; - } - } - - if (xattr_req) - dict_unref (xattr_req); - - return 0; -} - int afr_sh_metadata_post_nonblocking_inodelk_cbk (call_frame_t *frame, xlator_t *this) @@ -683,7 +625,8 @@ afr_sh_metadata_post_nonblocking_inodelk_cbk (call_frame_t *frame, gf_log (this->name, GF_LOG_DEBUG, "Non Blocking metadata " "inodelks done for %s. Proceeding to FOP", local->loc.path); - afr_sh_metadata_lookup (frame, this); + afr_sh_common_lookup (frame, this, &local->loc, + afr_sh_metadata_lookup_cbk, _gf_false); } return 0; |