summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src/ec-generic.c
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2015-04-26 14:28:00 +0530
committerVijay Bellur <vbellur@redhat.com>2015-05-08 05:56:11 -0700
commit02f9835d24aa07bd4e9fcb39cb7ace343f31924f (patch)
tree43ff543742f500f24237a84330cb321deca4c288 /xlators/cluster/ec/src/ec-generic.c
parentbf8250bcca7f484269f64b6a73f9330d843b320b (diff)
cluster/ec: Change meaning of trusted.ec.dirty
- With this change, the xattr will represent if the file needs to be healed or not. It will have different values for data/entry and metadata changes. - inode ref leaks and dict_set_dynstr related leaks fixed - Added support for trylock/lock based on heal-cmd execution or not in data heal. - Made fixes to pass regression runs Change-Id: I9d8def4c2badde18a76b7898816fecfac113737a BUG: 1215265 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/10385 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/cluster/ec/src/ec-generic.c')
-rw-r--r--xlators/cluster/ec/src/ec-generic.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/xlators/cluster/ec/src/ec-generic.c b/xlators/cluster/ec/src/ec-generic.c
index 50169771476..d957bf6533d 100644
--- a/xlators/cluster/ec/src/ec-generic.c
+++ b/xlators/cluster/ec/src/ec-generic.c
@@ -759,7 +759,6 @@ void ec_lookup_rebuild(ec_t * ec, ec_fop_data_t * fop, ec_cbk_data_t * cbk)
for (i = 0, ans = cbk; (ans != NULL) && (i < ec->fragments);
ans = ans->next)
{
- if (!ans->dirty) {
data = dict_get(ans->xdata, GF_CONTENT_KEY);
if (data != NULL)
{
@@ -770,7 +769,6 @@ void ec_lookup_rebuild(ec_t * ec, ec_fop_data_t * fop, ec_cbk_data_t * cbk)
}
i++;
}
- }
}
if (i >= ec->fragments)
@@ -878,8 +876,6 @@ int32_t ec_lookup_cbk(call_frame_t * frame, void * cookie, xlator_t * this,
}
if (xdata != NULL)
{
- uint64_t dirty;
-
cbk->xdata = dict_ref(xdata);
if (cbk->xdata == NULL)
{
@@ -888,9 +884,8 @@ int32_t ec_lookup_cbk(call_frame_t * frame, void * cookie, xlator_t * this,
goto out;
}
- if (ec_dict_del_number(cbk->xdata, EC_XATTR_DIRTY, &dirty) == 0) {
- cbk->dirty = dirty != 0;
- }
+ ec_dict_del_array (xdata, EC_XATTR_DIRTY, cbk->dirty,
+ EC_VERSION_SIZE);
}
ec_combine(cbk, ec_combine_lookup);
@@ -1341,7 +1336,6 @@ ec_xattrop_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
goto out;
if (op_ret >= 0) {
- uint64_t dirty;
cbk->dict = dict_ref (xattr);
if (dict_get_bin (xattr, EC_XATTR_VERSION,
@@ -1350,9 +1344,8 @@ ec_xattrop_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if ((version >> EC_SELFHEAL_BIT) & 1)
fop->healing |= (1ULL<<idx);
}
-
- if (ec_dict_del_number (xattr, EC_XATTR_DIRTY, &dirty) == 0)
- cbk->dirty = dirty != 0;
+ ec_dict_del_array (xattr, EC_XATTR_DIRTY, cbk->dirty,
+ EC_VERSION_SIZE);
}
if (xdata)