From e4d25d50b58d3ee08453492852b79425c398aa05 Mon Sep 17 00:00:00 2001 From: Xavier Hernandez Date: Mon, 29 Sep 2014 11:31:24 +0200 Subject: ec: Fix 32 bits issues on file size calculation Some additional 32 bits issues have been added by a recent patch. This patch solves it. Change-Id: Ice81032fbe8e36e5ccad19a781b7876891993906 BUG: 1146903 Signed-off-by: Xavier Hernandez Reviewed-on: http://review.gluster.org/8882 Tested-by: Gluster Build System Reviewed-by: Emmanuel Dreyfus Tested-by: Emmanuel Dreyfus Reviewed-by: Vijay Bellur --- xlators/cluster/ec/src/ec-common.c | 6 ++---- xlators/cluster/ec/src/ec-data.h | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'xlators') diff --git a/xlators/cluster/ec/src/ec-common.c b/xlators/cluster/ec/src/ec-common.c index 2f96ac10dbf..0ba7bce7728 100644 --- a/xlators/cluster/ec/src/ec-common.c +++ b/xlators/cluster/ec/src/ec-common.c @@ -1285,8 +1285,7 @@ out: void ec_flush_size_version(ec_fop_data_t * fop) { ec_lock_t * lock; - uint64_t version; - size_t delta; + uint64_t version, delta; GF_ASSERT(fop->lock_count == 1); @@ -1316,8 +1315,7 @@ void ec_lock_reuse(ec_fop_data_t * fop, int32_t update) ec_fop_data_t * wait_fop; ec_lock_t * lock; ec_lock_link_t * link; - size_t delta = 0; - uint64_t version = 0; + uint64_t version = 0, delta = 0; int32_t refs = 0; int32_t i; diff --git a/xlators/cluster/ec/src/ec-data.h b/xlators/cluster/ec/src/ec-data.h index d87cb26b52d..532ca95444a 100644 --- a/xlators/cluster/ec/src/ec-data.h +++ b/xlators/cluster/ec/src/ec-data.h @@ -149,8 +149,8 @@ struct _ec_lock int32_t refs; int32_t acquired; int32_t have_size; - size_t size; - size_t size_delta; + uint64_t size; + uint64_t size_delta; uint64_t version; uint64_t version_delta; ec_fop_data_t * owner; -- cgit