From: Loic Dachary Date: Wed, 18 Jun 2014 15:01:54 +0000 (+0200) Subject: erasure-code: verify that rados put enforces alignment X-Git-Tag: v0.83~78^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b46c4056014dd6de5e3bd736f2c41f096ea708b4;p=ceph.git erasure-code: verify that rados put enforces alignment http://tracker.ceph.com/issues/8622 refs: #8622 Signed-off-by: Loic Dachary --- diff --git a/src/test/erasure-code/test-erasure-code.sh b/src/test/erasure-code/test-erasure-code.sh index b779f6866a3..852c5c14847 100755 --- a/src/test/erasure-code/test-erasure-code.sh +++ b/src/test/erasure-code/test-erasure-code.sh @@ -60,6 +60,18 @@ function TEST_rados_put() { diff $dir/ORIGINAL $dir/COPY || return 1 rm $dir/ORIGINAL $dir/COPY + + # + # Verify that the rados command enforces alignment constraints + # imposed by the stripe width + # See http://tracker.ceph.com/issues/8622 + # + local stripe_width=$(./ceph-conf --show-config-value osd_pool_erasure_code_stripe_width) + local block_size=$((stripe_width - 1)) + dd if=/dev/zero of=$dir/ORIGINAL bs=$block_size count=2 + ./rados --block-size=$block_size \ + --pool ecpool put UNALIGNED $dir/ORIGINAL || return 1 + rm $dir/ORIGINAL } main test-erasure-code