mirror of
https://github.com/ceph/ceph
synced 2024-12-18 01:16:55 +00:00
erasure-code: restore jerasure BlaumRoth default w
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>
This commit is contained in:
parent
86bdd044e4
commit
f51d21b53d
@ -454,6 +454,10 @@ void ErasureCodeJerasureLiberation::prepare()
|
||||
//
|
||||
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;
|
||||
|
@ -236,7 +236,6 @@ public:
|
||||
ErasureCodeJerasureBlaumRoth() :
|
||||
ErasureCodeJerasureLiberation("blaum_roth")
|
||||
{
|
||||
DEFAULT_W = 6;
|
||||
}
|
||||
|
||||
virtual bool check_w(ostream *ss) const;
|
||||
|
Loading…
Reference in New Issue
Block a user