summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPranith Kumar K <pranithk@gluster.com>2012-06-05 14:50:26 +0530
committerVijay Bellur <vijay@gluster.com>2012-06-06 03:18:46 -0700
commit1bcc9412290629ec8e27915d1df090a01125c2c3 (patch)
treee0e82bbff7e592ce34ea170edd72edd073b39eaa
parentc4384df4e8729e19133854ba0b7dba7eae4edae4 (diff)
cluster/afr: Fix truncation of offset in 32-bit machines
Thanks to the fix submitted by Ian Latter and Michael Change-Id: I84a62a9183c70be6da055d23e4d60cc97cfcf531 BUG: 809982 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3521 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-algorithm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-algorithm.c b/xlators/cluster/afr/src/afr-self-heal-algorithm.c
index 857b9f499..89deefea4 100644
--- a/xlators/cluster/afr/src/afr-self-heal-algorithm.c
+++ b/xlators/cluster/afr/src/afr-self-heal-algorithm.c
@@ -193,7 +193,7 @@ sh_full_read_cbk (call_frame_t *rw_frame, void *cookie,
afr_self_heal_t *sh = NULL;
int i = 0;
int call_count = 0;
- off_t offset = (long) cookie;
+ off_t offset = 0;
priv = this->private;
rw_local = rw_frame->local;
@@ -205,6 +205,7 @@ sh_full_read_cbk (call_frame_t *rw_frame, void *cookie,
call_count = sh->active_sinks;
+ offset = rw_sh->offset;
rw_local->call_count = call_count;
gf_log (this->name, GF_LOG_TRACE,