save the default value of m to profile so that it could be dumped
in command 'ceph osd erasure-code-profile get xxx', which is more
useful and friendly to user.
Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>
ostream *ss)
{
int err = ErasureCodeJerasure::parse(profile, ss);
- profile.erase("m");
- m = 2;
+ if (m != stoi(DEFAULT_M)) {
+ *ss << "ReedSolomonRAID6: m=" << m
+ << " must be 2 for RAID6: revert to 2" << std::endl;
+ err = -EINVAL;
+ }
if (w != 8 && w != 16 && w != 32) {
*ss << "ReedSolomonRAID6: w=" << w
<< " must be one of {8, 16, 32} : revert to 8 " << std::endl;
matrix(0)
{
DEFAULT_K = "7";
+ DEFAULT_M = "2";
DEFAULT_W = "8";
}
~ErasureCodeJerasureReedSolomonRAID6() override {