mirror of
https://github.com/ceph/ceph
synced 2025-01-03 09:32:43 +00:00
Merge pull request #6068 from dachary/wip-12936-shec
erasure-code: shec must compare for equality with epsilon Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
commit
bee3bdf551
@ -501,7 +501,8 @@ int* ErasureCodeShec::shec_reedsolomon_coding_matrix(int is_single)
|
||||
if (true) {
|
||||
double r_e1;
|
||||
r_e1 = shec_calc_recovery_efficiency1(k, m1, m2, c1, c2);
|
||||
if (r_e1 < min_r_e1){
|
||||
if (min_r_e1 - r_e1 > std::numeric_limits<double>::epsilon() &&
|
||||
r_e1 < min_r_e1) {
|
||||
min_r_e1 = r_e1;
|
||||
c1_best = c1;
|
||||
m1_best = m1;
|
||||
|
@ -124,12 +124,7 @@ public:
|
||||
private:
|
||||
virtual int parse(const ErasureCodeProfile &profile) = 0;
|
||||
|
||||
virtual double shec_calc_recovery_efficiency1(int k, int m1, int m2, int c1, int c2)
|
||||
// http://tracker.ceph.com/issues/12936 shec fails i386 make check
|
||||
#if defined(__i386__) && defined(__GNUC__)
|
||||
__attribute__((optimize(0)))
|
||||
#endif
|
||||
;
|
||||
virtual double shec_calc_recovery_efficiency1(int k, int m1, int m2, int c1, int c2);
|
||||
virtual int shec_make_decoding_matrix(bool prepare,
|
||||
int *want, int *avails,
|
||||
int *decoding_matrix,
|
||||
|
Loading…
Reference in New Issue
Block a user