summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src/ec-inode-read.c
diff options
context:
space:
mode:
authorXavier Hernandez <xhernandez@datalab.es>2015-02-09 09:26:46 +0100
committerVijay Bellur <vbellur@redhat.com>2015-02-23 23:58:11 -0800
commit46a2b9e48160c593a73756d91781298144528e50 (patch)
tree85b688676dbdd8e8d1bbc55343ef411ad80465da /xlators/cluster/ec/src/ec-inode-read.c
parenta4a760a3cf793857e5fac7d13f5ef7028d30f666 (diff)
ec: Add trusted.ec.dirty xattr
This xattr will be incremented before each data modifying operation and decremented after it. This will add the possibility to detect partially updated writes and refuse them on reads. It will also be useful for interacting with index xlator and have a way to heal dispersed files from the self-heal daemon. Change-Id: Ie644a8dd074ae0f254c809c5863bdb030be5486a BUG: 1190581 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/9607 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/cluster/ec/src/ec-inode-read.c')
-rw-r--r--xlators/cluster/ec/src/ec-inode-read.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/cluster/ec/src/ec-inode-read.c b/xlators/cluster/ec/src/ec-inode-read.c
index 3483dfb3354..d126d48eb12 100644
--- a/xlators/cluster/ec/src/ec-inode-read.c
+++ b/xlators/cluster/ec/src/ec-inode-read.c
@@ -1182,6 +1182,10 @@ out:
int32_t ec_combine_readv(ec_fop_data_t * fop, ec_cbk_data_t * dst,
ec_cbk_data_t * src)
{
+ if (src->dirty) {
+ return 0;
+ }
+
if (!ec_vector_compare(dst->vector, dst->int32, src->vector, src->int32))
{
gf_log(fop->xl->name, GF_LOG_NOTICE, "Mismatching vector in "