From c75a5d348f0d30b61bdc45e9e54d623957a6050f Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Sat, 14 Apr 2012 18:02:05 +0530 Subject: cluster/afr: increment change log with correct byte order Change-Id: Id2af3e61ad659ff6d168161673e5e1e19f36bdb5 BUG: 765194 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.com/3149 Tested-by: Gluster Build System Reviewed-by: Jeff Darcy Reviewed-by: Vijay Bellur --- xlators/cluster/afr/src/afr-transaction.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'xlators') diff --git a/xlators/cluster/afr/src/afr-transaction.c b/xlators/cluster/afr/src/afr-transaction.c index 7a95f310a..c46ec6cf6 100644 --- a/xlators/cluster/afr/src/afr-transaction.c +++ b/xlators/cluster/afr/src/afr-transaction.c @@ -515,6 +515,7 @@ afr_changelog_post_op (call_frame_t *frame, xlator_t *this) int piggyback = 0; int index = 0; int nothing_failed = 1; + int32_t changelog = 0; local = frame->local; int_lock = &local->internal_lock; @@ -562,8 +563,10 @@ afr_changelog_post_op (call_frame_t *frame, xlator_t *this) if (local->optimistic_change_log && local->transaction.type != AFR_DATA_TRANSACTION) { /* if nothing_failed, then local->pending[..] == {0 .. 0} */ - for (i = 0; i < priv->child_count; i++) - local->pending[i][index]++; + for (i = 0; i < priv->child_count; i++) { + changelog = ntoh32 (local->pending[i][index]); + local->pending[i][index] = hton32 (changelog + 1); + } } for (i = 0; i < priv->child_count; i++) { -- cgit