Changing from W=7 to W=6 by default for the BlaumRoth technique is
correct but introduces a regression. The content that was encoded with
the previous version cannot be read again. Although the prime(w+1)
constraint was not obeyed by W=7, the encoded content was useable and
should keep being readable.
The W=7 remains the default for backward compatibility and an exception
to the prime(w+1) check.
http://tracker.ceph.com/issues/9572 Fixes: #9572
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
//
bool ErasureCodeJerasureBlaumRoth::check_w(ostream *ss) const
{
+ // back in Firefly, w = 7 was the default and produced useable
+ // chunks. Tolerate this value for backward compatibility.
+ if (w == 7)
+ return true;
if (w <= 2 || !is_prime(w+1)) {
*ss << "w=" << w << " must be greater than two and "
<< "w+1 must be prime" << std::endl;
ErasureCodeJerasureBlaumRoth() :
ErasureCodeJerasureLiberation("blaum_roth")
{
- DEFAULT_W = 6;
}
virtual bool check_w(ostream *ss) const;