summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec
diff options
context:
space:
mode:
authorXavier Hernandez <xhernandez@datalab.es>2014-09-29 11:31:24 +0200
committerVijay Bellur <vbellur@redhat.com>2014-10-20 03:41:16 -0700
commite4d25d50b58d3ee08453492852b79425c398aa05 (patch)
tree27b3b50272a9ad843496964855d1da8931f5068f /xlators/cluster/ec
parent8ea1eaf46153b56fb4c652a8eb9fb95a49038373 (diff)
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 <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/8882 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org> Tested-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/cluster/ec')
-rw-r--r--xlators/cluster/ec/src/ec-common.c6
-rw-r--r--xlators/cluster/ec/src/ec-data.h4
2 files changed, 4 insertions, 6 deletions
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;