Commit Graph

106 Commits (master)

Author SHA1 Message Date
Danny Al-Gaaf a21b2733a9 jerasure.c: add more checks for talloc/malloc results
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-27 20:27:23 +02:00
Danny Al-Gaaf 31810e1fdc jerasure.c: add check for result of malloc()
Add check for bitmatrix and return NULL if malloc failed.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-27 18:56:52 +02:00
Danny Al-Gaaf b14af86424 jerasure.c: free memory before return in error case
Fix for Coverity issue from Ceph project:

CID 1093211 (#1 of 1): Resource leak (RESOURCE_LEAK)
 20. leaked_storage: Variable "ind_to_row" going out of scope leaks
 the storage it points to.

CID 1093212 (#1 of 1): Resource leak (RESOURCE_LEAK)
 20. leaked_storage: Variable "row_ids" going out of scope leaks the
 storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-22 20:52:07 +02:00
Danny Al-Gaaf 4b6c76c659 Examples/*coder.c: add missing include of unistd.h
Fix warning: implicit declaration of function 'getcwd' is invalid in
C99 [-Wimplicit-function-declaration]

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-22 20:47:50 +02:00
Danny Al-Gaaf bd6cddba8b Examples/reed_sol_time_gf.c: include sys/time.h
Fix warning: implicit declaration of function 'gettimeofday' is
invalid in C99 [-Wimplicit-function-declaration]

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-22 20:44:30 +02:00
Danny Al-Gaaf 6d8fbc8b81 jerasure.c: fix memory leak in error case
Check matrix for NULL before call talloc().

CID 1093213 (#1 of 1): Resource leak (RESOURCE_LEAK)
 4. leaked_storage: Variable "bitmatrix" going out of scope
 leaks the storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-22 20:36:32 +02:00
Kevin Greenan 9e6b3483a3 Merged in dachary/jerasure/wip-init (pull request #17)
make galois_init_default_field(int w) extern
2014-04-08 15:57:55 -07:00
Loic Dachary 5c9577172c make galois_init_default_field(int w) extern
So that the application can initialize gfp_array and gfp_is_composite
instead of relying on initialization happening implicitly when the
multiply or xor functions are called. The init function can be called
once when the application guarantees thread safety. And the multiply and
xor functions can be called from multiple threads without risking races.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-04-09 00:05:18 +02:00
Kevin Greenan 80fc5d1d95 Merged in dachary/jerasure/wip-make-check (pull request #16)
run tests with make check
2014-04-03 16:39:03 -07:00
Kevin Greenan 3f6d524d2d Merged in dwglessner/jerasure/pull-#9-cleanup (pull request #15)
AM_CFLAGS and typo cleanup
2014-04-03 16:17:13 -07:00
Loic Dachary 81f4bdd6f5 run tests with make check
* Update the README accordingly
* Add the VALGRIND variable to run thru valgrind where possible
* Add the make check files administrative files to .gitignore

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-04-02 18:22:53 +02:00
David Glessner ff4db57328 Fix typo about Autoconf >= 2.65 requirement. 2014-03-31 21:08:55 -05:00
David Glessner a1f2d201d8 Remove -O3, -fPIC, $(INCLUDES) from AM_CFLAGS.
They aren't needed, and can be harmful if they override user selection.
2014-03-31 21:08:55 -05:00
Kevin Greenan fcd867d01b Merged in dachary/jerasure/wip-gf-complete-tests (pull request #12)
allow override of GF-Complete directory in test_all_gfs.sh
2014-03-31 08:59:50 -07:00
Kevin Greenan ca21b17557 Merged in dachary/jerasure/wip-warning-unused (pull request #14)
silence warning about bestrow used uninitialized
2014-03-31 08:22:43 -07:00
Loic Dachary cdc99aadc9 silence warning about bestrow used uninitialized
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-30 10:55:46 +02:00
Kevin Greenan 6052a15ef9 Merged in dachary/jerasure/wip-gitignore (pull request #11)
add .dirstamp to gitignore
2014-03-29 08:44:58 -07:00
Loic Dachary 4c82912f67 allow override of GF-Complete directory in test_all_gfs.sh
And document how to run it in the README

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-29 09:29:34 +01:00
Loic Dachary 912c575d3e add .dirstamp to gitignore
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-28 17:39:53 +01:00
David Glessner e79904ea00 This is the squashed pull request from David Glessner, squashed
and reviewed by Kevin Greenan.

Updated README

Allow out-of-source builds. Quiet autogen.sh warnings.

Use AM_CPPFLAGS instead of INCLUDES. Use $(top_srcdir).

Add .gitignore to quiet git status.

Add project URL to AC_INIT.

Stop libtool from compiling files twice.

Have git ignore .deps/.

Don't override user CPPFLAGS.

(PIC options appear to be set already. INCLUDES already included.)

Clean configure.ac.

Make it closer to autoscan output.

Have autotools create INSTALL.

Use AC_MSG_FAILURE if GF-Complete not found.

Run autogen.sh.

(autoconf 2.69, automake 1.14.1, libtool 2.4.2)

Add some .gitignore files.

Fix configure cpuid unknown issue.

Move AX_EXT before AC_CHECK_LIB(gf_complete...) so that
-lgf_complete doesn't cause CPUID conftest compile to fail.

Don't check for internal gf_int.h header.

GF-Complete doesn't install it.

Quiet some autoreconf warnings.

INCLUDES is now AM_CPPFLAGS. Use single-argument AM_INIT_AUTOMAKE.

Remove some AC_REQUIRE whose conftest always failed.

Quiet configure warning.

(ARCH_64 doesn't appear to be used.)

CPUID "unknown" fix from upstream autoconf-archive.

Allow out-of-source builds. Use dependency tracking.

Remove config.h.in~.

Update ax_check_compile_flag.m4 from autoconf-archive.

Add .gitattributes.

Remove autoreconf-generated files.

Remove ACLOCAL_AMFLAGS.

See Automake 1.13 release notes.

Add files for 'make dist'.

Quiet some warnings.

getcwd() in <unistd.h>. Remove some vars.

Make headers compatible with C++.

Quiet some warnings.

Install additional headers in include/jerasure/.

Quiet some configure check internal failures.

Use new AX_REQUIRE_DEFINED instead of AC_REQUIRE, which expands
the macro and causes internal compile failure.

Fix file permissions.

Remove INTEL_SSE compiler defines.

(Can use HAVE_xxx or __xxx__ instead.)

Set default CFLAGS to '-g -O3 -Wall'.

Add more checks from autoscan.

Use AC_CONFIG_AUX_DIR([build-aux]).

Use processor time for timing.

Use clock() instead of gettimeofday().

Use common LDADD in Makefile.am.

Remove pre-autotools makefiles.

Ignore *.a. (Missed earlier.)

Quiet more warnings.

Document need for autoreconf -fi.

Removed README.nd and README.txt so changes don't need to be duplicated.

Remove autogen.sh.

Just use "autoreconf --force --install".
2014-03-28 08:34:46 -07:00
David Glessner e84360f811 Quiet configure warning.
(ARCH_64 doesn't appear to be used.)
2014-03-28 08:34:46 -07:00
James Plank da3b76730e Merged in dachary/jerasure/wip-compilation-warnings (pull request #2)
fix compilation warnings
2014-03-05 22:12:44 -05:00
Loic Dachary d4730bfd7d add missing return value to functions that require it
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-06 01:38:29 +01:00
Loic Dachary 87f301084d remove unused variables
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-06 01:38:29 +01:00
Jim Plank c21f772f11 Fixed some compiler warnings. 2014-02-07 12:12:54 -05:00
Jim Plank 8a85c829d6 Added compilation instructions for when you don't have GF-Complete
installed as root.
2014-02-07 11:39:19 -05:00
Jim Plank 01322795bf Added the user manual PDF to Manual.pdf 2014-01-29 16:39:29 -05:00
Jim Plank 39ff8b9b35 More formatting. 2014-01-29 16:35:36 -05:00
Jim Plank 1f72931215 Formatting. 2014-01-29 16:08:53 -05:00
Jim Plank 8907dee8f1 Added the user's manual. 2014-01-29 15:56:05 -05:00
James Plank 08d7edc092 Merged in kmgreen2/jerasure-kmg (pull request #1)
Time to update to jerasure 2.0
2014-01-25 10:58:24 -05:00
Jim Plank be40b4e549 Revision 2.0 is ready for prime time! 2014-01-25 10:55:29 -05:00
Jim Plank 7a502868f1 Needed .txt 2014-01-24 16:54:20 -05:00
Jim Plank b5ff7900d8 Making sure ht enew readme is there. 2014-01-24 16:53:09 -05:00
Jim Plank 9124ad1382 Ran through all of the examples to make them current. I'll have to
do another sanity-checking pass, and fix multby_2 in the reed_sol code,
but then we're done.
2014-01-24 16:50:41 -05:00
Kevin Greenan 9cca12d46f Make autoconf put BSD license in COPYING. 2014-01-07 08:40:05 -08:00
Jim Plank c9f420fdcd Minor typos and stuff. More later. 2014-01-01 15:02:19 -05:00
Kevin Greenan 16838859dc Added code to not use gf-complete mult_by_one if region size is small (less than 16 bytes). 2013-12-27 20:56:16 -08:00
Kevin Greenan c4ab254bbc Do SIMD XOR, where possible! 2013-12-20 08:21:46 -08:00
Kevin Greenan 1733366245 Fix README(s) 2013-12-04 23:11:29 -08:00
Kevin Greenan 00a17c0a7a Setup autoconf to work with Jerasure 2013-12-04 23:08:08 -08:00
Kevin Greenan 4a55d9ba9f Added performance numbers and more text to the README 2013-11-24 18:41:24 -08:00
Kevin Greenan d8c84dcbb9 Added tests for the GF init helper functions in galois.c
Updated the README to explain the GF change procedure.
2013-11-24 13:51:30 -08:00
Kevin Greenan e5170f7072 Error handling fixed in test scripts... 2013-11-23 12:18:29 -08:00
Kevin Greenan 44201cf436 Added new license header for version 2.0
Updated the README (Going to add detail on how to us GF-complete soon)
2013-11-23 12:05:19 -08:00
Kevin Greenan 8d673c08fc Re-org and re-named some stuff... 2013-11-23 10:35:28 -08:00
Kevin Greenan 5eb73fa7d1 Clean-up and use of aligned buffers in Test/
All of the new tests appear to pass.
2013-11-18 22:17:05 -08:00
Kevin Greenan 07de6b80f8 Make sure tests always grab aligned buffers (use valloc instead of malloc). 2013-11-18 21:13:59 -08:00
Kevin Greenan d23b6d5343 Move 'install' to $(INCDIR) instead of $(INCDIR)/jerasure 2013-10-19 07:40:57 -07:00
Tushar Gohad 67f236bba6 jerasure: Add -fPIC to CFLAGS
Signed-off-by: Tushar Gohad <tsg@swiftdev.(none)>
2013-10-15 19:29:19 -07:00