]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
erasure-code: store and compare encoded contents
authorLoic Dachary <loic-201408@dachary.org>
Sat, 13 Sep 2014 08:16:31 +0000 (10:16 +0200)
committerLoic Dachary <ldachary@redhat.com>
Mon, 10 Nov 2014 13:56:43 +0000 (14:56 +0100)
commitf5901303dbf50e9d08f2f1e510a1936a20037909
tree7df549c61a58c743106b4db0d7fb69c13c3e76d3
parent4b07381dafb925332254bb74da7b7a4cdcfe42b7
erasure-code: store and compare encoded contents

Introduce ceph_erasure_code_non_regression to check and compare how an
erasure code plugin encodes and decodes content with a given set of
parameters. For instance:

./ceph_erasure_code_non_regression \
      --plugin jerasure \
      --parameter technique=reed_sol_van \
      --parameter k=2 \
      --parameter m=2 \
      --stripe-width 3181 \
      --create \
      --check

Will create an encoded object (--create) and store it into a directory
along with the chunks, one chunk per file. The directory name is derived
from the parameters. The content of the object is a random pattern of 31
bytes repeated to fill the object size specified with --stripe-width.

The check function (--check) reads the object back from the file,
encodes it and compares the result with the content of the chunks read
from the files. It also attempts recover from one or two erasures.

Chunks encoded by a given version of Ceph are expected to be encoded
exactly in the same way by all Ceph versions going forward.

http://tracker.ceph.com/issues/9420 Refs: #9420

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
src/.gitignore
src/test/erasure-code/Makefile.am
src/test/erasure-code/ceph_erasure_code_non_regression.cc [new file with mode: 0644]