summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src/ec-generic.c
diff options
context:
space:
mode:
authorXavier Hernandez <xhernandez@datalab.es>2015-05-28 16:54:59 +0200
committerPranith Kumar Karampuri <pkarampu@redhat.com>2015-05-30 05:35:33 -0700
commit90ed7128dfd4d10e65efcc866cfd610ba3b0cc30 (patch)
tree446bf4ff0c06fb059dba65edf54bf819a6d4d0ca /xlators/cluster/ec/src/ec-generic.c
parent54b193760ce59569fa5813e64af7753afbf0d500 (diff)
cluster/ec: Ignore differences in non locked inodes
When ec combines iatt structures from multiple bricks, it checks for equality in important fields. This is ok for iatt related to inodes involved in the operation that have been locked before starting execution. However some fops return iatt information from other inodes. For example a rename locks source and destination parent directories, but it also returns an iatt from the entry itself. In these cases we ignore differences in some fields to avoid false detection of inconsistencies and trigger unnecessary self-heals. Another issue is solved in this patch that caused that the real size of the file stored into the inode context was lost during self-heal. Change-Id: I8b8eca30b2a6c39c7b9bbd3b3b6ba95228fcc041 BUG: 1225793 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/10974 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: NetBSD Build System
Diffstat (limited to 'xlators/cluster/ec/src/ec-generic.c')
-rw-r--r--xlators/cluster/ec/src/ec-generic.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/xlators/cluster/ec/src/ec-generic.c b/xlators/cluster/ec/src/ec-generic.c
index f50c7a70560..a455dad9f6b 100644
--- a/xlators/cluster/ec/src/ec-generic.c
+++ b/xlators/cluster/ec/src/ec-generic.c
@@ -235,8 +235,7 @@ out:
int32_t ec_combine_fsync(ec_fop_data_t * fop, ec_cbk_data_t * dst,
ec_cbk_data_t * src)
{
- if (!ec_iatt_combine(dst->iatt, src->iatt, 2))
- {
+ if (!ec_iatt_combine(fop, dst->iatt, src->iatt, 2)) {
gf_log(fop->xl->name, GF_LOG_NOTICE, "Mismatching iatt in "
"answers of 'GF_FOP_FSYNC'");
@@ -813,8 +812,7 @@ void ec_lookup_rebuild(ec_t * ec, ec_fop_data_t * fop, ec_cbk_data_t * cbk)
int32_t ec_combine_lookup(ec_fop_data_t * fop, ec_cbk_data_t * dst,
ec_cbk_data_t * src)
{
- if (!ec_iatt_combine(dst->iatt, src->iatt, 2))
- {
+ if (!ec_iatt_combine(fop, dst->iatt, src->iatt, 2)) {
gf_log(fop->xl->name, GF_LOG_NOTICE, "Mismatching iatt in "
"answers of 'GF_FOP_LOOKUP'");