Merge pull request #2556 from dachary/wip-9572-erasure-code-blaumroth

erasure-code: restore jerasure BlaumRoth default w

Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Loic Dachary 2014-09-30 01:48:26 +02:00
commit 9c4616dcd2
2 changed files with 4 additions and 1 deletions

View File

@ -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;

View File

@ -236,7 +236,6 @@ public:
ErasureCodeJerasureBlaumRoth() :
ErasureCodeJerasureLiberation("blaum_roth")
{
DEFAULT_W = 6;
}
virtual bool check_w(ostream *ss) const;