From 292b4e42fdc023e307fde35e189285040d4b9cdd Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Wed, 28 Jun 2017 05:09:12 -0400 Subject: contrib/xxhash: Add xxhash library xxhash is a faster non-cryptographic hash. https://github.com/Cyan4973/xxHash Release Taken: "xxHash v0.6.2" -------------- Files added: contrib/xxhash/xxhash.c contrib/xxhash/xxhash.h contrib/xxhash/xxhsum.c Modifications to source: ------------------------ Following functions and data types got 'GF_' prefix as below to avoid any form of name collisions in future. ---- Functions ---- GF_XXH_versionNumber GF_XXH32 GF_XXH32_createState GF_XXH32_freeState GF_XXH32_copyState GF_XXH32_reset GF_XXH32_update GF_XXH32_digest GF_XXH32_canonicalFromHash GF_XXH32_hashFromCanonical GF_XXH64 GF_XXH64_createState GF_XXH64_freeState GF_XXH64_copyState GF_XXH64_reset GF_XXH64_update GF_XXH64_digest GF_XXH64_canonicalFromHash GF_XXH64_hashFromCanonical ---- Data Types ---- GF_XXH_errorcode GF_XXH32_state_t* GF_XXH32_canonical_t* GF_XXH32_hash_t GF_XXH64_state_t* GF_XXH64_canonical_t* GF_XXH64_hash_t It is linked with libglusterfs.so. A wrapper funtion is also added for the easy usage in common-utils.c. xxhash can be used for the all the usecases where a faster non-cryptographic hash is required. gfid to path infra would be using this for now. NOTE: ---- The gluster coding guidelines check is ignored as maintaining it further would be difficult. Updates: #253 Change-Id: Ib143f90d91d4ee99864a10246d5983e92900173b Signed-off-by: Kotresh HR Reviewed-on: https://review.gluster.org/17641 Smoke: Gluster Build System Reviewed-by: Amar Tumballi CentOS-regression: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Niels de Vos --- libglusterfs/src/Makefile.am | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libglusterfs/src/Makefile.am') diff --git a/libglusterfs/src/Makefile.am b/libglusterfs/src/Makefile.am index 52b73166ddb..768fe042a10 100644 --- a/libglusterfs/src/Makefile.am +++ b/libglusterfs/src/Makefile.am @@ -9,7 +9,8 @@ libglusterfs_la_CPPFLAGS = $(GF_CPPFLAGS) -D__USE_FILE_OFFSET64 \ -I$(top_srcdir)/rpc/xdr/src/ -I$(top_builddir)/rpc/xdr/src/ \ -I$(top_srcdir)/rpc/rpc-lib/src/ -I$(CONTRIBDIR)/rbtree \ -I$(CONTRIBDIR)/libexecinfo ${ARGP_STANDALONE_CPPFLAGS} \ - -DSBIN_DIR=\"$(sbindir)\" -I$(CONTRIBDIR)/timer-wheel + -DSBIN_DIR=\"$(sbindir)\" -I$(CONTRIBDIR)/timer-wheel \ + -I$(CONTRIBDIR)/xxhash libglusterfs_la_LIBADD = @LEXLIB@ $(ZLIB_LIBS) $(MATH_LIB) $(UUID_LIBS) libglusterfs_la_LDFLAGS = -version-info $(LIBGLUSTERFS_LT_VERSION) @@ -33,6 +34,7 @@ libglusterfs_la_SOURCES = dict.c xlator.c logging.c \ $(CONTRIBDIR)/libexecinfo/execinfo.c quota-common-utils.c rot-buffs.c \ $(CONTRIBDIR)/timer-wheel/timer-wheel.c \ $(CONTRIBDIR)/timer-wheel/find_last_bit.c default-args.c locking.c \ + $(CONTRIBDIR)/xxhash/xxhash.c \ compound-fop-utils.c throttle-tbf.c nodist_libglusterfs_la_SOURCES = y.tab.c graph.lex.c defaults.c @@ -62,6 +64,7 @@ noinst_HEADERS = unittest/unittest.h \ $(CONTRIBDIR)/mount/mntent_compat.h \ $(CONTRIBDIR)/libexecinfo/execinfo_compat.h \ $(CONTRIBDIR)/timer-wheel/timer-wheel.h \ + $(CONTRIBDIR)/xxhash/xxhash.h \ tier-ctr-interface.h if !HAVE_LIBUUID -- cgit