Compile cityhash code into libzfs

Make the cityhash code compile into libzfs, in preparation for the new
"zstream" command.

Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
Closes #10152
This commit is contained in:
Matthew Ahrens
2020-03-27 09:11:22 -07:00
committed by GitHub
parent ef3331e703
commit 3f38797338
10 changed files with 11 additions and 6 deletions
+1
View File
@@ -11,6 +11,7 @@ ccflags-y := $(ZFS_MODULE_CFLAGS) $(ZFS_MODULE_CPPFLAGS)
# Suppress unused-value warnings in sparc64 architecture headers
ccflags-$(CONFIG_SPARC64) += -Wno-unused-value
$(MODULE)-objs += cityhash.o
$(MODULE)-objs += zfeature_common.o
$(MODULE)-objs += zfs_comutil.o
$(MODULE)-objs += zfs_deleg.o
@@ -22,7 +22,7 @@
* Copyright (c) 2017 by Delphix. All rights reserved.
*/
#include <sys/cityhash.h>
#include <cityhash.h>
#define HASH_K1 0xb492b66fbe98f273ULL
#define HASH_K2 0x9ae16a3b2f90404fULL
@@ -61,3 +61,7 @@ cityhash4(uint64_t w1, uint64_t w2, uint64_t w3, uint64_t w4)
a + rotate(b + HASH_K2, 18) + c, mul));
}
#if defined(_KERNEL)
EXPORT_SYMBOL(cityhash4);
#endif
-1
View File
@@ -22,7 +22,6 @@ $(MODULE)-objs += bpobj.o
$(MODULE)-objs += bptree.o
$(MODULE)-objs += btree.o
$(MODULE)-objs += bqueue.o
$(MODULE)-objs += cityhash.o
$(MODULE)-objs += dataset_kstats.o
$(MODULE)-objs += dbuf.o
$(MODULE)-objs += dbuf_stats.o
+1 -1
View File
@@ -299,7 +299,7 @@
#include <sys/arc_impl.h>
#include <sys/trace_zfs.h>
#include <sys/aggsum.h>
#include <sys/cityhash.h>
#include <cityhash.h>
#ifndef _KERNEL
/* set with ZFS_DEBUG=watch, to enable watchpoints on frozen buffers */
+1 -1
View File
@@ -48,7 +48,7 @@
#include <sys/callb.h>
#include <sys/abd.h>
#include <sys/vdev.h>
#include <sys/cityhash.h>
#include <cityhash.h>
#include <sys/spa_impl.h>
kstat_t *dbuf_ksp;
+1 -1
View File
@@ -47,7 +47,7 @@
#include <sys/trace_zfs.h>
#include <sys/abd.h>
#include <sys/dsl_crypt.h>
#include <sys/cityhash.h>
#include <cityhash.h>
/*
* ==========================================================================