aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArvind Sankar <[email protected]>2020-06-11 16:38:25 -0400
committerBrian Behlendorf <[email protected]>2020-06-18 12:21:32 -0700
commit0ce2de637bf73e2c7e483e644aa09797439734ef (patch)
treec4d45fff310b523f8fe44d8a7887348aafc5d27a
parent60356b1a211a0fcfe7dbd2e1dd280d6fc0170cf0 (diff)
Add prototypes
Add prototypes/move prototypes to header files. Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Arvind Sankar <[email protected]> Closes #10470
-rw-r--r--include/libzfs_impl.h1
-rw-r--r--include/libzutil.h1
-rw-r--r--include/os/freebsd/zfs/sys/vdev_os.h3
-rw-r--r--include/os/freebsd/zfs/sys/zfs_vfsops.h3
-rw-r--r--include/os/linux/spl/sys/trace.h31
-rw-r--r--include/os/linux/zfs/sys/zfs_vfsops.h3
-rw-r--r--include/sys/lua/luaconf.h1
-rw-r--r--include/sys/vdev_raidz_impl.h2
-rw-r--r--include/sys/zil.h1
-rw-r--r--lib/libspl/include/umem.h5
-rw-r--r--lib/libzfs/libzfs_dataset.c108
-rw-r--r--lib/libzfs/libzfs_sendrecv.c3
-rw-r--r--lib/libzfs/libzfs_util.c108
-rw-r--r--module/icp/algs/aes/aes_impl_x86-64.c12
-rw-r--r--module/icp/algs/skein/skein.c8
-rw-r--r--module/icp/algs/skein/skein_impl.h8
-rw-r--r--module/icp/include/aes/aes_impl.h10
-rw-r--r--module/lua/llimits.h2
-rw-r--r--module/os/freebsd/spl/acl_common.c2
-rw-r--r--module/os/freebsd/spl/callb.c3
-rw-r--r--module/os/freebsd/zfs/kmod_core.c5
-rw-r--r--module/os/freebsd/zfs/spa_os.c4
-rw-r--r--module/os/freebsd/zfs/vdev_geom.c1
-rw-r--r--module/zfs/vdev_raidz_math.c2
-rw-r--r--module/zfs/zfs_ioctl.c3
-rw-r--r--module/zfs/zfs_log.c2
26 files changed, 169 insertions, 163 deletions
diff --git a/include/libzfs_impl.h b/include/libzfs_impl.h
index 78b5a0586..35b92f6d9 100644
--- a/include/libzfs_impl.h
+++ b/include/libzfs_impl.h
@@ -148,6 +148,7 @@ int no_memory(libzfs_handle_t *);
int zfs_standard_error(libzfs_handle_t *, int, const char *);
int zfs_standard_error_fmt(libzfs_handle_t *, int, const char *, ...);
+void zfs_setprop_error(libzfs_handle_t *, zfs_prop_t, int, char *);
int zpool_standard_error(libzfs_handle_t *, int, const char *);
int zpool_standard_error_fmt(libzfs_handle_t *, int, const char *, ...);
diff --git a/include/libzutil.h b/include/libzutil.h
index 98998e195..82a802678 100644
--- a/include/libzutil.h
+++ b/include/libzutil.h
@@ -136,6 +136,7 @@ extern void zfs_nicenum(uint64_t, char *, size_t);
extern void zfs_nicenum_format(uint64_t, char *, size_t,
enum zfs_nicenum_format);
extern void zfs_nicetime(uint64_t, char *, size_t);
+extern void zfs_niceraw(uint64_t, char *, size_t);
#define nicenum(num, buf, size) zfs_nicenum(num, buf, size)
diff --git a/include/os/freebsd/zfs/sys/vdev_os.h b/include/os/freebsd/zfs/sys/vdev_os.h
index e2780fdbb..59da954b9 100644
--- a/include/os/freebsd/zfs/sys/vdev_os.h
+++ b/include/os/freebsd/zfs/sys/vdev_os.h
@@ -27,4 +27,7 @@
#define _SYS_VDEV_OS_H
extern int vdev_label_write_pad2(vdev_t *vd, const char *buf, size_t size);
+extern int vdev_geom_read_pool_label(const char *name, nvlist_t ***configs,
+ uint64_t *count);
+
#endif
diff --git a/include/os/freebsd/zfs/sys/zfs_vfsops.h b/include/os/freebsd/zfs/sys/zfs_vfsops.h
index 26652004b..70ada204a 100644
--- a/include/os/freebsd/zfs/sys/zfs_vfsops.h
+++ b/include/os/freebsd/zfs/sys/zfs_vfsops.h
@@ -153,6 +153,9 @@ typedef struct zfid_long {
extern uint_t zfs_fsyncer_key;
extern int zfs_super_owner;
+extern void zfs_init(void);
+extern void zfs_fini(void);
+
extern int zfs_suspend_fs(zfsvfs_t *zfsvfs);
extern int zfs_resume_fs(zfsvfs_t *zfsvfs, struct dsl_dataset *ds);
extern int zfs_end_fs(zfsvfs_t *zfsvfs, struct dsl_dataset *ds);
diff --git a/include/os/linux/spl/sys/trace.h b/include/os/linux/spl/sys/trace.h
index 55c587358..b148ace6a 100644
--- a/include/os/linux/spl/sys/trace.h
+++ b/include/os/linux/spl/sys/trace.h
@@ -104,27 +104,45 @@
trace_zfs_##name((uintptr_t)(arg1), (uintptr_t)(arg2), \
(uintptr_t)(arg3), (uintptr_t)(arg4))
+#define PROTO_DTRACE_PROBE(name) \
+ noinline void trace_zfs_##name(void)
+#define PROTO_DTRACE_PROBE1(name) \
+ noinline void trace_zfs_##name(uintptr_t)
+#define PROTO_DTRACE_PROBE2(name) \
+ noinline void trace_zfs_##name(uintptr_t, uintptr_t)
+#define PROTO_DTRACE_PROBE3(name) \
+ noinline void trace_zfs_##name(uintptr_t, uintptr_t, \
+ uintptr_t)
+#define PROTO_DTRACE_PROBE4(name) \
+ noinline void trace_zfs_##name(uintptr_t, uintptr_t, \
+ uintptr_t, uintptr_t)
+
#if defined(CREATE_TRACE_POINTS)
#define FUNC_DTRACE_PROBE(name) \
+PROTO_DTRACE_PROBE(name); \
noinline void trace_zfs_##name(void) { } \
EXPORT_SYMBOL(trace_zfs_##name)
#define FUNC_DTRACE_PROBE1(name) \
+PROTO_DTRACE_PROBE1(name); \
noinline void trace_zfs_##name(uintptr_t arg1) { } \
EXPORT_SYMBOL(trace_zfs_##name)
#define FUNC_DTRACE_PROBE2(name) \
+PROTO_DTRACE_PROBE2(name); \
noinline void trace_zfs_##name(uintptr_t arg1, \
uintptr_t arg2) { } \
EXPORT_SYMBOL(trace_zfs_##name)
#define FUNC_DTRACE_PROBE3(name) \
+PROTO_DTRACE_PROBE3(name); \
noinline void trace_zfs_##name(uintptr_t arg1, \
uintptr_t arg2, uintptr_t arg3) { } \
EXPORT_SYMBOL(trace_zfs_##name)
#define FUNC_DTRACE_PROBE4(name) \
+PROTO_DTRACE_PROBE4(name); \
noinline void trace_zfs_##name(uintptr_t arg1, \
uintptr_t arg2, uintptr_t arg3, uintptr_t arg4) { } \
EXPORT_SYMBOL(trace_zfs_##name)
@@ -146,19 +164,6 @@ EXPORT_SYMBOL(trace_zfs_##name)
#else /* CREATE_TRACE_POINTS */
-#define PROTO_DTRACE_PROBE(name) \
- noinline void trace_zfs_##name(void)
-#define PROTO_DTRACE_PROBE1(name) \
- noinline void trace_zfs_##name(uintptr_t)
-#define PROTO_DTRACE_PROBE2(name) \
- noinline void trace_zfs_##name(uintptr_t, uintptr_t)
-#define PROTO_DTRACE_PROBE3(name) \
- noinline void trace_zfs_##name(uintptr_t, uintptr_t, \
- uintptr_t)
-#define PROTO_DTRACE_PROBE4(name) \
- noinline void trace_zfs_##name(uintptr_t, uintptr_t, \
- uintptr_t, uintptr_t)
-
#define DEFINE_DTRACE_PROBE(name) PROTO_DTRACE_PROBE(name)
#define DEFINE_DTRACE_PROBE1(name) PROTO_DTRACE_PROBE1(name)
#define DEFINE_DTRACE_PROBE2(name) PROTO_DTRACE_PROBE2(name)
diff --git a/include/os/linux/zfs/sys/zfs_vfsops.h b/include/os/linux/zfs/sys/zfs_vfsops.h
index 4e60a081a..24a0a2e6a 100644
--- a/include/os/linux/zfs/sys/zfs_vfsops.h
+++ b/include/os/linux/zfs/sys/zfs_vfsops.h
@@ -195,6 +195,9 @@ typedef struct zfid_long {
#define SHORT_FID_LEN (sizeof (zfid_short_t) - sizeof (uint16_t))
#define LONG_FID_LEN (sizeof (zfid_long_t) - sizeof (uint16_t))
+extern void zfs_init(void);
+extern void zfs_fini(void);
+
extern int zfs_suspend_fs(zfsvfs_t *zfsvfs);
extern int zfs_resume_fs(zfsvfs_t *zfsvfs, struct dsl_dataset *ds);
extern int zfs_end_fs(zfsvfs_t *zfsvfs, struct dsl_dataset *ds);
diff --git a/include/sys/lua/luaconf.h b/include/sys/lua/luaconf.h
index fa7861336..ce99f339f 100644
--- a/include/sys/lua/luaconf.h
+++ b/include/sys/lua/luaconf.h
@@ -15,6 +15,7 @@
extern ssize_t lcompat_sprintf(char *, size_t size, const char *, ...);
extern int64_t lcompat_strtoll(const char *, char **);
extern int64_t lcompat_pow(int64_t, int64_t);
+extern int lcompat_hashnum(int64_t);
/*
** ==================================================================
diff --git a/include/sys/vdev_raidz_impl.h b/include/sys/vdev_raidz_impl.h
index 81a321ee5..8492daedb 100644
--- a/include/sys/vdev_raidz_impl.h
+++ b/include/sys/vdev_raidz_impl.h
@@ -133,6 +133,8 @@ typedef struct raidz_map {
#define RAIDZ_ORIGINAL_IMPL (INT_MAX)
extern const raidz_impl_ops_t vdev_raidz_scalar_impl;
+extern boolean_t raidz_will_scalar_work(void);
+
#if defined(__x86_64) && defined(HAVE_SSE2) /* only x86_64 for now */
extern const raidz_impl_ops_t vdev_raidz_sse2_impl;
#endif
diff --git a/include/sys/zil.h b/include/sys/zil.h
index 716b19e56..7e61a1330 100644
--- a/include/sys/zil.h
+++ b/include/sys/zil.h
@@ -496,6 +496,7 @@ extern void zil_itx_assign(zilog_t *zilog, itx_t *itx, dmu_tx_t *tx);
extern void zil_async_to_sync(zilog_t *zilog, uint64_t oid);
extern void zil_commit(zilog_t *zilog, uint64_t oid);
extern void zil_commit_impl(zilog_t *zilog, uint64_t oid);
+extern void zil_remove_async(zilog_t *zilog, uint64_t oid);
extern int zil_reset(const char *osname, void *txarg);
extern int zil_claim(struct dsl_pool *dp,
diff --git a/lib/libspl/include/umem.h b/lib/libspl/include/umem.h
index a92dce9b2..49e9f9c14 100644
--- a/lib/libspl/include/umem.h
+++ b/lib/libspl/include/umem.h
@@ -80,6 +80,11 @@ typedef struct umem_cache {
int cache_cflags;
} umem_cache_t;
+/* Prototypes for functions to provide defaults for umem envvars */
+const char *_umem_debug_init(void);
+const char *_umem_options_init(void);
+const char *_umem_logging_init(void);
+
static inline void *
umem_alloc(size_t size, int flags)
{
diff --git a/lib/libzfs/libzfs_dataset.c b/lib/libzfs/libzfs_dataset.c
index 4f1dec138..4252c8cf0 100644
--- a/lib/libzfs/libzfs_dataset.c
+++ b/lib/libzfs/libzfs_dataset.c
@@ -1722,114 +1722,6 @@ zfs_fix_auto_resv(zfs_handle_t *zhp, nvlist_t *nvl)
return (1);
}
-void
-zfs_setprop_error(libzfs_handle_t *hdl, zfs_prop_t prop, int err,
- char *errbuf)
-{
- switch (err) {
-
- case ENOSPC:
- /*
- * For quotas and reservations, ENOSPC indicates
- * something different; setting a quota or reservation
- * doesn't use any disk space.
- */
- switch (prop) {
- case ZFS_PROP_QUOTA:
- case ZFS_PROP_REFQUOTA:
- zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
- "size is less than current used or "
- "reserved space"));
- (void) zfs_error(hdl, EZFS_PROPSPACE, errbuf);
- break;
-
- case ZFS_PROP_RESERVATION:
- case ZFS_PROP_REFRESERVATION:
- zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
- "size is greater than available space"));
- (void) zfs_error(hdl, EZFS_PROPSPACE, errbuf);
- break;
-
- default:
- (void) zfs_standard_error(hdl, err, errbuf);
- break;
- }
- break;
-
- case EBUSY:
- (void) zfs_standard_error(hdl, EBUSY, errbuf);
- break;
-
- case EROFS:
- (void) zfs_error(hdl, EZFS_DSREADONLY, errbuf);
- break;
-
- case E2BIG:
- zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
- "property value too long"));
- (void) zfs_error(hdl, EZFS_BADPROP, errbuf);
- break;
-
- case ENOTSUP:
- zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
- "pool and or dataset must be upgraded to set this "
- "property or value"));
- (void) zfs_error(hdl, EZFS_BADVERSION, errbuf);
- break;
-
- case ERANGE:
- if (prop == ZFS_PROP_COMPRESSION ||
- prop == ZFS_PROP_DNODESIZE ||
- prop == ZFS_PROP_RECORDSIZE) {
- (void) zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
- "property setting is not allowed on "
- "bootable datasets"));
- (void) zfs_error(hdl, EZFS_NOTSUP, errbuf);
- } else if (prop == ZFS_PROP_CHECKSUM ||
- prop == ZFS_PROP_DEDUP) {
- (void) zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
- "property setting is not allowed on "
- "root pools"));
- (void) zfs_error(hdl, EZFS_NOTSUP, errbuf);
- } else {
- (void) zfs_standard_error(hdl, err, errbuf);
- }
- break;
-
- case EINVAL:
- if (prop == ZPROP_INVAL) {
- (void) zfs_error(hdl, EZFS_BADPROP, errbuf);
- } else {
- (void) zfs_standard_error(hdl, err, errbuf);
- }
- break;
-
- case EACCES:
- if (prop == ZFS_PROP_KEYLOCATION) {
- zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
- "keylocation may only be set on encryption roots"));
- (void) zfs_error(hdl, EZFS_BADPROP, errbuf);
- } else {
- (void) zfs_standard_error(hdl, err, errbuf);
- }
- break;
-
- case EOVERFLOW:
- /*
- * This platform can't address a volume this big.
- */
-#ifdef _ILP32
- if (prop == ZFS_PROP_VOLSIZE) {
- (void) zfs_error(hdl, EZFS_VOLTOOBIG, errbuf);
- break;
- }
-#endif
- /* FALLTHROUGH */
- default:
- (void) zfs_standard_error(hdl, err, errbuf);
- }
-}
-
static boolean_t
zfs_is_namespace_prop(zfs_prop_t prop)
{
diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c
index 097766c19..75f4e056b 100644
--- a/lib/libzfs/libzfs_sendrecv.c
+++ b/lib/libzfs/libzfs_sendrecv.c
@@ -69,9 +69,6 @@
#include <sys/socket.h>
#include <sys/sha2.h>
-/* in libzfs_dataset.c */
-extern void zfs_setprop_error(libzfs_handle_t *, zfs_prop_t, int, char *);
-
static int zfs_receive_impl(libzfs_handle_t *, const char *, const char *,
recvflags_t *, int, const char *, nvlist_t *, avl_tree_t *, char **,
const char *, nvlist_t *);
diff --git a/lib/libzfs/libzfs_util.c b/lib/libzfs/libzfs_util.c
index e8ef40e5a..04936250b 100644
--- a/lib/libzfs/libzfs_util.c
+++ b/lib/libzfs/libzfs_util.c
@@ -481,6 +481,114 @@ zfs_standard_error_fmt(libzfs_handle_t *hdl, int error, const char *fmt, ...)
return (-1);
}
+void
+zfs_setprop_error(libzfs_handle_t *hdl, zfs_prop_t prop, int err,
+ char *errbuf)
+{
+ switch (err) {
+
+ case ENOSPC:
+ /*
+ * For quotas and reservations, ENOSPC indicates
+ * something different; setting a quota or reservation
+ * doesn't use any disk space.
+ */
+ switch (prop) {
+ case ZFS_PROP_QUOTA:
+ case ZFS_PROP_REFQUOTA:
+ zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+ "size is less than current used or "
+ "reserved space"));
+ (void) zfs_error(hdl, EZFS_PROPSPACE, errbuf);
+ break;
+
+ case ZFS_PROP_RESERVATION:
+ case ZFS_PROP_REFRESERVATION:
+ zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+ "size is greater than available space"));
+ (void) zfs_error(hdl, EZFS_PROPSPACE, errbuf);
+ break;
+
+ default:
+ (void) zfs_standard_error(hdl, err, errbuf);
+ break;
+ }
+ break;
+
+ case EBUSY:
+ (void) zfs_standard_error(hdl, EBUSY, errbuf);
+ break;
+
+ case EROFS:
+ (void) zfs_error(hdl, EZFS_DSREADONLY, errbuf);
+ break;
+
+ case E2BIG:
+ zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+ "property value too long"));
+ (void) zfs_error(hdl, EZFS_BADPROP, errbuf);
+ break;
+
+ case ENOTSUP:
+ zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+ "pool and or dataset must be upgraded to set this "
+ "property or value"));
+ (void) zfs_error(hdl, EZFS_BADVERSION, errbuf);
+ break;
+
+ case ERANGE:
+ if (prop == ZFS_PROP_COMPRESSION ||
+ prop == ZFS_PROP_DNODESIZE ||
+ prop == ZFS_PROP_RECORDSIZE) {
+ (void) zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+ "property setting is not allowed on "
+ "bootable datasets"));
+ (void) zfs_error(hdl, EZFS_NOTSUP, errbuf);
+ } else if (prop == ZFS_PROP_CHECKSUM ||
+ prop == ZFS_PROP_DEDUP) {
+ (void) zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+ "property setting is not allowed on "
+ "root pools"));
+ (void) zfs_error(hdl, EZFS_NOTSUP, errbuf);
+ } else {
+ (void) zfs_standard_error(hdl, err, errbuf);
+ }
+ break;
+
+ case EINVAL:
+ if (prop == ZPROP_INVAL) {
+ (void) zfs_error(hdl, EZFS_BADPROP, errbuf);
+ } else {
+ (void) zfs_standard_error(hdl, err, errbuf);
+ }
+ break;
+
+ case EACCES:
+ if (prop == ZFS_PROP_KEYLOCATION) {
+ zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+ "keylocation may only be set on encryption roots"));
+ (void) zfs_error(hdl, EZFS_BADPROP, errbuf);
+ } else {
+ (void) zfs_standard_error(hdl, err, errbuf);
+ }
+ break;
+
+ case EOVERFLOW:
+ /*
+ * This platform can't address a volume this big.
+ */
+#ifdef _ILP32
+ if (prop == ZFS_PROP_VOLSIZE) {
+ (void) zfs_error(hdl, EZFS_VOLTOOBIG, errbuf);
+ break;
+ }
+#endif
+ /* FALLTHROUGH */
+ default:
+ (void) zfs_standard_error(hdl, err, errbuf);
+ }
+}
+
int
zpool_standard_error(libzfs_handle_t *hdl, int error, const char *msg)
{
diff --git a/module/icp/algs/aes/aes_impl_x86-64.c b/module/icp/algs/aes/aes_impl_x86-64.c
index 0ee7ee99c..19f8fd501 100644
--- a/module/icp/algs/aes/aes_impl_x86-64.c
+++ b/module/icp/algs/aes/aes_impl_x86-64.c
@@ -25,18 +25,6 @@
#if defined(__x86_64)
#include <sys/simd.h>
-
-/* These functions are used to execute amd64 instructions for AMD or Intel: */
-extern int rijndael_key_setup_enc_amd64(uint32_t rk[],
- const uint32_t cipherKey[], int keyBits);
-extern int rijndael_key_setup_dec_amd64(uint32_t rk[],
- const uint32_t cipherKey[], int keyBits);
-extern void aes_encrypt_amd64(const uint32_t rk[], int Nr,
- const uint32_t pt[4], uint32_t ct[4]);
-extern void aes_decrypt_amd64(const uint32_t rk[], int Nr,
- const uint32_t ct[4], uint32_t pt[4]);
-
-
#include <aes/aes_impl.h>
/*
diff --git a/module/icp/algs/skein/skein.c b/module/icp/algs/skein/skein.c
index 0187f7be6..39a0bff35 100644
--- a/module/icp/algs/skein/skein.c
+++ b/module/icp/algs/skein/skein.c
@@ -12,14 +12,6 @@
#include <sys/skein.h> /* get the Skein API definitions */
#include "skein_impl.h" /* get internal definitions */
-/* External function to process blkCnt (nonzero) full block(s) of data. */
-void Skein_256_Process_Block(Skein_256_Ctxt_t *ctx, const uint8_t *blkPtr,
- size_t blkCnt, size_t byteCntAdd);
-void Skein_512_Process_Block(Skein_512_Ctxt_t *ctx, const uint8_t *blkPtr,
- size_t blkCnt, size_t byteCntAdd);
-void Skein1024_Process_Block(Skein1024_Ctxt_t *ctx, const uint8_t *blkPtr,
- size_t blkCnt, size_t byteCntAdd);
-
/* 256-bit Skein */
/* init the context for a straight hashing operation */
int
diff --git a/module/icp/algs/skein/skein_impl.h b/module/icp/algs/skein/skein_impl.h
index ea834e619..205a517d6 100644
--- a/module/icp/algs/skein/skein_impl.h
+++ b/module/icp/algs/skein/skein_impl.h
@@ -281,4 +281,12 @@ extern const uint64_t SKEIN1024_IV_384[];
extern const uint64_t SKEIN1024_IV_512[];
extern const uint64_t SKEIN1024_IV_1024[];
+/* Functions to process blkCnt (nonzero) full block(s) of data. */
+void Skein_256_Process_Block(Skein_256_Ctxt_t *ctx, const uint8_t *blkPtr,
+ size_t blkCnt, size_t byteCntAdd);
+void Skein_512_Process_Block(Skein_512_Ctxt_t *ctx, const uint8_t *blkPtr,
+ size_t blkCnt, size_t byteCntAdd);
+void Skein1024_Process_Block(Skein1024_Ctxt_t *ctx, const uint8_t *blkPtr,
+ size_t blkCnt, size_t byteCntAdd);
+
#endif /* _SKEIN_IMPL_H_ */
diff --git a/module/icp/include/aes/aes_impl.h b/module/icp/include/aes/aes_impl.h
index 0484462ca..41dccaa38 100644
--- a/module/icp/include/aes/aes_impl.h
+++ b/module/icp/include/aes/aes_impl.h
@@ -195,6 +195,16 @@ struct aes_impl_ops {
extern const aes_impl_ops_t aes_generic_impl;
#if defined(__x86_64)
extern const aes_impl_ops_t aes_x86_64_impl;
+
+/* These functions are used to execute amd64 instructions for AMD or Intel: */
+extern int rijndael_key_setup_enc_amd64(uint32_t rk[],
+ const uint32_t cipherKey[], int keyBits);
+extern int rijndael_key_setup_dec_amd64(uint32_t rk[],
+ const uint32_t cipherKey[], int keyBits);
+extern void aes_encrypt_amd64(const uint32_t rk[], int Nr,
+ const uint32_t pt[4], uint32_t ct[4]);
+extern void aes_decrypt_amd64(const uint32_t rk[], int Nr,
+ const uint32_t ct[4], uint32_t pt[4]);
#endif
#if defined(__x86_64) && defined(HAVE_AES)
extern const aes_impl_ops_t aes_aesni_impl;
diff --git a/module/lua/llimits.h b/module/lua/llimits.h
index 2126a1464..b989160f4 100644
--- a/module/lua/llimits.h
+++ b/module/lua/llimits.h
@@ -281,8 +281,6 @@ union luai_Cast { double l_d; LUA_INT32 l_p[2]; };
#if defined(ltable_c) && !defined(luai_hashnum)
-extern int lcompat_hashnum(int64_t);
-
#define luai_hashnum(i,n) (i = lcompat_hashnum(n))
#endif
diff --git a/module/os/freebsd/spl/acl_common.c b/module/os/freebsd/spl/acl_common.c
index ee89c8233..66e27cefa 100644
--- a/module/os/freebsd/spl/acl_common.c
+++ b/module/os/freebsd/spl/acl_common.c
@@ -159,7 +159,7 @@ typedef struct ace_list {
* returns (-1 = less than, 0 = equal, 1 = greater than
*/
void
-ksort(caddr_t v, int n, int s, int (*f)())
+ksort(caddr_t v, int n, int s, int (*f)(void *, void *))
{
int g, i, j, ii;
unsigned int *p1, *p2;
diff --git a/module/os/freebsd/spl/callb.c b/module/os/freebsd/spl/callb.c
index 04ea396f5..8db8e69b3 100644
--- a/module/os/freebsd/spl/callb.c
+++ b/module/os/freebsd/spl/callb.c
@@ -52,7 +52,8 @@ typedef struct callb {
char c_flag; /* info about the callb state */
uchar_t c_class; /* this callb's class */
kcondvar_t c_done_cv; /* signal callb completion */
- boolean_t (*c_func)(); /* cb function: returns true if ok */
+ boolean_t (*c_func)(void *, int);
+ /* cb function: returns true if ok */
void *c_arg; /* arg to c_func */
char c_name[CB_MAXNAME+1]; /* debug:max func name length */
} callb_t;
diff --git a/module/os/freebsd/zfs/kmod_core.c b/module/os/freebsd/zfs/kmod_core.c
index 17e9e8dff..4a4f55ea6 100644
--- a/module/os/freebsd/zfs/kmod_core.c
+++ b/module/os/freebsd/zfs/kmod_core.c
@@ -106,11 +106,6 @@ SYSCTL_INT(_vfs_zfs_version, OID_AUTO, ioctl, CTLFLAG_RD, &zfs_version_ioctl,
static struct cdev *zfsdev;
-extern void zfs_init(void);
-extern void zfs_fini(void);
-extern void zfs_ioctl_init(void);
-
-
static struct root_hold_token *zfs_root_token;
extern uint_t rrw_tsd_key;
diff --git a/module/os/freebsd/zfs/spa_os.c b/module/os/freebsd/zfs/spa_os.c
index ed124a5fa..a84b8532e 100644
--- a/module/os/freebsd/zfs/spa_os.c
+++ b/module/os/freebsd/zfs/spa_os.c
@@ -37,6 +37,7 @@
#include <sys/zil.h>
#include <sys/ddt.h>
#include <sys/vdev_impl.h>
+#include <sys/vdev_os.h>
#include <sys/vdev_removal.h>
#include <sys/vdev_indirect_mapping.h>
#include <sys/vdev_indirect_births.h>
@@ -72,9 +73,6 @@
#include "zfs_prop.h"
#include "zfs_comutil.h"
-extern int vdev_geom_read_pool_label(const char *name, nvlist_t ***configs,
- uint64_t *count);
-
static nvlist_t *
spa_generate_rootconf(const char *name)
{
diff --git a/module/os/freebsd/zfs/vdev_geom.c b/module/os/freebsd/zfs/vdev_geom.c
index 0efdb1be5..80fc37840 100644
--- a/module/os/freebsd/zfs/vdev_geom.c
+++ b/module/os/freebsd/zfs/vdev_geom.c
@@ -32,6 +32,7 @@
#include <sys/spa.h>
#include <sys/spa_impl.h>
#include <sys/vdev_impl.h>
+#include <sys/vdev_os.h>
#include <sys/fs/zfs.h>
#include <sys/zio.h>
#include <geom/geom.h>
diff --git a/module/zfs/vdev_raidz_math.c b/module/zfs/vdev_raidz_math.c
index 14120e110..acaa32f6d 100644
--- a/module/zfs/vdev_raidz_math.c
+++ b/module/zfs/vdev_raidz_math.c
@@ -31,8 +31,6 @@
#include <sys/vdev_raidz_impl.h>
#include <sys/simd.h>
-extern boolean_t raidz_will_scalar_work(void);
-
/* Opaque implementation with NULL methods to represent original methods */
static const raidz_impl_ops_t vdev_raidz_original_impl = {
.name = "original",
diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c
index 8debed924..4122114b5 100644
--- a/module/zfs/zfs_ioctl.c
+++ b/module/zfs/zfs_ioctl.c
@@ -222,9 +222,6 @@
kmutex_t zfsdev_state_lock;
zfsdev_state_t *zfsdev_state_list;
-extern void zfs_init(void);
-extern void zfs_fini(void);
-
/*
* Limit maximum nvlist size. We don't want users passing in insane values
* for zc->zc_nvlist_src_size, since we will need to allocate that much memory.
diff --git a/module/zfs/zfs_log.c b/module/zfs/zfs_log.c
index 6951ef90b..4eae855f4 100644
--- a/module/zfs/zfs_log.c
+++ b/module/zfs/zfs_log.c
@@ -408,8 +408,6 @@ zfs_log_create(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype,
zil_itx_assign(zilog, itx, tx);
}
-void zil_remove_async(zilog_t *zilog, uint64_t oid);
-
/*
* Handles both TX_REMOVE and TX_RMDIR transactions.
*/