From 449c046bf6b039b2ba86be34677056686f7bc5ce Mon Sep 17 00:00:00 2001 From: Xavier Hernandez Date: Mon, 4 Aug 2014 20:50:31 +0200 Subject: ec: Removed SSE2 dependency This patch implements the Galois Field multiplications using pure C code without any assembler support. This makes the ec xlator portable to other architectures. In the future it will be possible to use an optimized implementation of the multiplications using architecture dependent facilities (it will be automatically detected and configured). To allow bricks with different machine word sizes to be able to work seamlessly in the same volume, the minimum fragment length to be stored in any brick has been fixed to 512 bytes. Otherwise, different implementations will corrupt the data (SSE2 used 128 bytes, while new implementation would have used 64). This patch also removes the '-msse2' option added on patch http://review.gluster.org/8396/ This is a backport of http://review.gluster.org/8413/ Change-Id: Iaf6e4ef3dcfda6c68f48f16ca46fc4fb61a215f4 BUG: 1140845 Signed-off-by: Xavier Hernandez Reviewed-on: http://review.gluster.org/8701 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- tests/basic/ec/ec-common | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/basic/ec') diff --git a/tests/basic/ec/ec-common b/tests/basic/ec/ec-common index b52fecbd9a9..0fddd35ac14 100644 --- a/tests/basic/ec/ec-common +++ b/tests/basic/ec/ec-common @@ -3,10 +3,12 @@ SIZE_LIST="1048576 1000 12345 0" LAST_BRICK=$(($DISPERSE - 1)) +CHUNK_SIZE=512 + function fragment_size { local fragments=$(($DISPERSE - $REDUNDANCY)) - local block_size=$((128 * $fragments)) + local block_size=$(($CHUNK_SIZE * $fragments)) local size=$(($1 + $block_size - 1)) echo $((( $size - ( $size ) % $block_size ) / $fragments)) -- cgit