summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src/ec-common.c
diff options
context:
space:
mode:
authorXavier Hernandez <xhernandez@datalab.es>2014-10-06 16:34:58 +0200
committerVijay Bellur <vbellur@redhat.com>2014-10-20 03:40:04 -0700
commit8ea1eaf46153b56fb4c652a8eb9fb95a49038373 (patch)
treef3fadf3d5ae4c1bffe810ca8801c01b8523f718f /xlators/cluster/ec/src/ec-common.c
parent2d92565e60485c81bbe6b3ebde60aeb623eda36a (diff)
ec: Fix incorrect management of healed bricks
The final lookup made to restore final file attributes after a self-heal did clear the mask of bad bricks, causing that the final setattr won't modify any brick at all. This caused that some attriutes, specially the modification time of the file didn't get updated properly. Now the mask of healed bricks is saved before doing the last lookup. It's also used to correctly report the repaired bricks. Change-Id: Ib94083c9e1b562515dfb54f9574120f1f031dccc BUG: 1149723 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/8905 Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/cluster/ec/src/ec-common.c')
-rw-r--r--xlators/cluster/ec/src/ec-common.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/xlators/cluster/ec/src/ec-common.c b/xlators/cluster/ec/src/ec-common.c
index 4d7beee63b9..2f96ac10dbf 100644
--- a/xlators/cluster/ec/src/ec-common.c
+++ b/xlators/cluster/ec/src/ec-common.c
@@ -1166,7 +1166,13 @@ void ec_get_size_version(ec_fop_data_t * fop)
goto out;
}
- ec_lookup(fop->frame, fop->xl, fop->mask, EC_MINIMUM_MIN,
+ /* For normal fops, ec_lookup() must succeed on at least EC_MINIMUM_MIN
+ * bricks, however when this is called as part of a self-heal operation
+ * the mask of target bricks (fop->mask) could contain less than
+ * EC_MINIMUM_MIN bricks, causing the lookup to always fail. Thus we
+ * always use the same minimum used for the main fop.
+ */
+ ec_lookup(fop->frame, fop->xl, fop->mask, fop->minimum,
ec_get_size_version_set, NULL, &loc, xdata);
fop->frame->root->uid = uid;