summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-self-heal-entry.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-entry.c')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-entry.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c
index 3906b707e0c..70edd5babad 100644
--- a/xlators/cluster/afr/src/afr-self-heal-entry.c
+++ b/xlators/cluster/afr/src/afr-self-heal-entry.c
@@ -217,10 +217,8 @@ afr_sh_entry_erase_pending (call_frame_t *frame, xlator_t *this)
sh = &local->self_heal;
priv = this->private;
-
- afr_sh_pending_to_delta (sh->xattr, AFR_ENTRY_PENDING,
- sh->delta_matrix, sh->success,
- priv->child_count);
+ afr_sh_pending_to_delta (priv, sh->xattr, sh->delta_matrix, sh->success,
+ priv->child_count, AFR_ENTRY_TRANSACTION);
erase_xattr = CALLOC (sizeof (*erase_xattr), priv->child_count);
@@ -233,8 +231,8 @@ afr_sh_entry_erase_pending (call_frame_t *frame, xlator_t *this)
}
}
- afr_sh_delta_to_xattr (sh->delta_matrix, erase_xattr,
- priv->child_count, AFR_ENTRY_PENDING);
+ afr_sh_delta_to_xattr (priv, sh->delta_matrix, erase_xattr,
+ priv->child_count, AFR_ENTRY_TRANSACTION);
local->call_count = call_count;
for (i = 0; i < priv->child_count; i++) {
@@ -1824,12 +1822,11 @@ afr_sh_entry_fix (call_frame_t *frame, xlator_t *this)
sh = &local->self_heal;
priv = this->private;
- afr_sh_build_pending_matrix (sh->pending_matrix, sh->xattr,
- priv->child_count, AFR_ENTRY_PENDING);
+ afr_sh_build_pending_matrix (priv, sh->pending_matrix, sh->xattr,
+ priv->child_count, AFR_ENTRY_TRANSACTION);
afr_sh_print_pending_matrix (sh->pending_matrix, this);
-
afr_sh_mark_sources (sh, priv->child_count,
AFR_SELF_HEAL_ENTRY);
@@ -1902,9 +1899,13 @@ afr_sh_entry_lookup (call_frame_t *frame, xlator_t *this)
local->call_count = call_count;
xattr_req = dict_new();
- if (xattr_req)
- ret = dict_set_uint64 (xattr_req, AFR_ENTRY_PENDING,
- priv->child_count * sizeof(int32_t));
+ 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));
+ }
+ }
for (i = 0; i < priv->child_count; i++) {
if (local->child_up[i]) {