goto wait;
if (err)
goto reply;
+ } else if (plugin == "shec") {
+ if (!g_ceph_context->check_experimental_feature_enabled("shec", &ss)) {
+ err = -EINVAL;
+ goto reply;
+ }
}
dout(20) << "erasure code profile " << name << " set" << dendl;
pending_inc.set_erasure_code_profile(name, profile_map);
#!/bin/bash
#
# Copyright (C) 2014 Cloudwatt <libre.licensing@cloudwatt.com>
-# Copyright (C) 2014 Red Hat <contact@redhat.com>
+# Copyright (C) 2014, 2015 Red Hat <contact@redhat.com>
#
# Author: Loic Dachary <loic@dachary.org>
#
export CEPH_MON="127.0.0.1:7101"
export CEPH_ARGS
CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none "
+ CEPH_ARGS+="--enable-experimental-unrecoverable-data-corrupting-features=shec "
CEPH_ARGS+="--mon-host=$CEPH_MON "
setup $dir || return 1
./ceph osd erasure-code-profile rm $profile
}
+function TEST_rados_put_get_shec() {
+ local dir=$1
+
+ local poolname=pool-shec
+ local profile=profile-shec
+
+ ./ceph osd erasure-code-profile set $profile \
+ plugin=shec \
+ k=2 m=1 c=1 \
+ ruleset-failure-domain=osd || return 1
+ ./ceph osd pool create $poolname 12 12 erasure $profile \
+ || return 1
+
+ rados_put_get $dir $poolname || return 1
+
+ delete_pool $poolname
+ ./ceph osd erasure-code-profile rm $profile
+}
+
function TEST_alignment_constraints() {
local payload=ABC
echo "$payload" > $dir/ORIGINAL
#!/bin/bash
#
# Copyright (C) 2014 Cloudwatt <libre.licensing@cloudwatt.com>
-# Copyright (C) 2014 Red Hat <contact@redhat.com>
+# Copyright (C) 2014, 2015 Red Hat <contact@redhat.com>
#
# Author: Loic Dachary <loic@dachary.org>
#
grep -q "unknown erasure code profile 'WRONG'" $dir/out || return 1
}
+function SHARE_MON_TEST_experimental_shec() {
+ local dir=$1
+ local id=$2
+
+ local profile=shec-profile
+
+ ! ./ceph osd erasure-code-profile set $profile plugin=shec > $dir/out 2>&1 || return 1
+ grep "experimental feature 'shec'" $dir/out || return 1
+ ! ./ceph osd erasure-code-profile ls | grep $profile || return 1
+}
+
function TEST_format_invalid() {
local dir=$1