]> 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:57:15 +0000 (16:57 +0100)
commit4f4358708ed3c261ca4027cc9c3dc3f952a99470
tree00fd511aaa06b9ad8be6bfdff00c1b3a83c32fee
parent4a148df544978383c1ed7cd8b90f590adb563f3d
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]