summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorXavier Hernandez <xhernandez@datalab.es>2014-08-04 20:50:31 +0200
committerVijay Bellur <vbellur@redhat.com>2014-09-12 02:56:31 -0700
commit449c046bf6b039b2ba86be34677056686f7bc5ce (patch)
tree748acd55f8e47b3ae2b2b6ec0507aa2b5ad52c1b /tests
parent444ffda19e2052b5fc78f7dc020de161ebee8563 (diff)
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 <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/8701 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/basic/ec/ec-common4
1 files changed, 3 insertions, 1 deletions
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))