Hide Forgot
hi, in the call of afr_set_piggyback_dict() arr = GF_CALLOC (3 * sizeof (int32_t), priv->child_count,gf_afr_mt_char); should be arr = GF_CALLOC (3 * sizeof (int32_t), 1,gf_afr_mt_char); please check.
PATCH: http://patches.gluster.com/patch/6415 in master (cluster/afr: Fix wrong memory allocation)
Thanks a lot for pointing it out Rick.
size_t pending_xattr_size = 3 * sizeof (int32_t); /* 3 = data+metadata+entry */ index = afr_index_for_transaction_type (type); for (i = 0; i < priv->child_count; i++) { arr = GF_CALLOC (1, pending_xattr_size, gf_afr_mt_char); if (!arr) { ret = -1; goto out; } This is fixed now as per the code.