]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
erasure-code: verify that rados put enforces alignment 1987/head
authorLoic Dachary <loic@dachary.org>
Wed, 18 Jun 2014 15:01:54 +0000 (17:01 +0200)
committerLoic Dachary <loic@dachary.org>
Wed, 18 Jun 2014 21:13:34 +0000 (23:13 +0200)
http://tracker.ceph.com/issues/8622 refs: #8622

Signed-off-by: Loic Dachary <loic@dachary.org>
src/test/erasure-code/test-erasure-code.sh

index b779f6866a37e63a510f2a50339e24a0a200e8c2..852c5c148470a4d5c86e70d039aaf55fdd1ad527 100755 (executable)
@@ -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