]> 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>
Tue, 25 Nov 2014 15:31:35 +0000 (16:31 +0100)
commit1b7fc7e49e6edf0d0f7d1d6d9f9447c42067d8b8
tree6f52d3b40b1166344d30aaa22ddeb4b6e23bbd22
parent37ffccbd57e7e441e0eb1499e5c173aa9c375d35
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>
(cherry picked from commit f5901303dbf50e9d08f2f1e510a1936a20037909)
src/.gitignore
src/test/erasure-code/Makefile.am
src/test/erasure-code/ceph_erasure_code_non_regression.cc [new file with mode: 0644]