liberasurecode/src
Pete Zaitcev 960cdd09dc Stop using ceill() to compute padded data size
The well-known idiom to compute a required number of data blocks
of size B to contain data of length d is:

     (d + (B-1))/B

The code we use, with ceill(), computes the same value, but does
it in an unorthodox way. This makes a reviewer to doubt himself
and even run tests to make sure we're really computing the
obvious thing.

Apropos the reviewer confusion, the code in Phazr.IO looks weird.
It uses (word_size - hamming_distance) to compute the necessary
number of blocks... but then returns the amount of memory needed
to store blocks of a different size (word_size). We left all of it
alone and return exactly the same values that the old computation
returned.

All these computations were the only thing in the code that used
-lm, so drop that too.

Coincidentially, this patch solves the crash of distro-built
packages of liberasurecode (see Red Hat bug #1454543). But it's
a side effect. Expect a proper patch soon.

Change-Id: Ib297f6df304abf5ca8c27d3392b1107a525e0be0
2017-06-06 14:53:45 -04:00
..
backends Stop using ceill() to compute padded data size 2017-06-06 14:53:45 -04:00
builtin Fix valgrind-check and memory leak 2017-02-20 07:45:55 -08:00
utils/chksum Fixing Issue #19 by stubbing out Jerasures uninit function. 2015-09-12 17:34:38 -07:00
Makefile.am Merge "Fix warning on automake tool" 2017-05-10 15:35:41 +00:00
erasurecode.c Stop using ceill() to compute padded data size 2017-06-06 14:53:45 -04:00
erasurecode_helpers.c Stop using ceill() to compute padded data size 2017-06-06 14:53:45 -04:00
erasurecode_postprocessing.c Add Phazr.IO libphazr backend to liberasurecode 2017-02-28 11:14:11 -08:00
erasurecode_preprocessing.c Add Phazr.IO libphazr backend to liberasurecode 2017-02-28 11:14:11 -08:00