From bb2ed23d8129c8db628475d744656b9b43f839c0 Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Wed, 18 Jun 2014 17:01:54 +0200 Subject: [PATCH] erasure-code: verify that rados put enforces alignment http://tracker.ceph.com/issues/8622 refs: #8622 Signed-off-by: Loic Dachary (cherry picked from commit b46c4056014dd6de5e3bd736f2c41f096ea708b4) --- src/test/erasure-code/test-erasure-code.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/test/erasure-code/test-erasure-code.sh b/src/test/erasure-code/test-erasure-code.sh index b779f6866a37e..852c5c148470a 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 -- 2.39.5