From 90ed7128dfd4d10e65efcc866cfd610ba3b0cc30 Mon Sep 17 00:00:00 2001 From: Xavier Hernandez Date: Thu, 28 May 2015 16:54:59 +0200 Subject: 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 Reviewed-on: http://review.gluster.org/10974 Reviewed-by: Pranith Kumar Karampuri Tested-by: NetBSD Build System --- xlators/cluster/ec/src/ec-inode-read.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'xlators/cluster/ec/src/ec-inode-read.c') diff --git a/xlators/cluster/ec/src/ec-inode-read.c b/xlators/cluster/ec/src/ec-inode-read.c index 853d914148b..ae02e964c3d 100644 --- a/xlators/cluster/ec/src/ec-inode-read.c +++ b/xlators/cluster/ec/src/ec-inode-read.c @@ -936,8 +936,7 @@ out: int32_t ec_combine_readlink(ec_fop_data_t * fop, ec_cbk_data_t * dst, ec_cbk_data_t * src) { - if (!ec_iatt_combine(dst->iatt, src->iatt, 1)) - { + if (!ec_iatt_combine(fop, dst->iatt, src->iatt, 1)) { gf_log(fop->xl->name, GF_LOG_NOTICE, "Mismatching iatt in " "answers of 'GF_FOP_READLINK'"); @@ -1210,8 +1209,7 @@ int32_t ec_combine_readv(ec_fop_data_t * fop, ec_cbk_data_t * dst, return 0; } - if (!ec_iatt_combine(dst->iatt, src->iatt, 1)) - { + if (!ec_iatt_combine(fop, dst->iatt, src->iatt, 1)) { gf_log(fop->xl->name, GF_LOG_NOTICE, "Mismatching iatt in " "answers of 'GF_FOP_READ'"); @@ -1493,8 +1491,7 @@ out: int32_t ec_combine_stat(ec_fop_data_t * fop, ec_cbk_data_t * dst, ec_cbk_data_t * src) { - if (!ec_iatt_combine(dst->iatt, src->iatt, 1)) - { + if (!ec_iatt_combine(fop, dst->iatt, src->iatt, 1)) { gf_log(fop->xl->name, GF_LOG_NOTICE, "Mismatching iatt in " "answers of 'GF_FOP_STAT'"); -- cgit