From 1bcc9412290629ec8e27915d1df090a01125c2c3 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Tue, 5 Jun 2012 14:50:26 +0530 Subject: 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 Reviewed-on: http://review.gluster.com/3521 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/cluster/afr/src/afr-self-heal-algorithm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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, -- cgit