summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmd/zpool/os/freebsd/zpool_vdev_os.c10
-rw-r--r--include/os/freebsd/spl/acl/acl_common.h1
-rw-r--r--include/sys/zfs_context.h1
-rw-r--r--lib/libshare/libshare.c8
-rw-r--r--lib/libspl/asm-generic/atomic.c50
-rw-r--r--lib/libtpool/thread_pool.c53
-rw-r--r--lib/libzfs/os/freebsd/libzfs_compat.c35
-rw-r--r--lib/libzfs/os/freebsd/libzfs_zmount.c11
-rw-r--r--module/icp/include/sys/bitmap.h4
-rw-r--r--module/os/freebsd/spl/acl_common.c22
-rw-r--r--module/os/freebsd/spl/spl_kstat.c16
-rw-r--r--module/os/linux/zfs/zfs_vnops.c19
-rw-r--r--module/os/linux/zfs/zvol_os.c6
-rw-r--r--module/zfs/ddt.c6
-rw-r--r--module/zfs/zrlock.c9
-rw-r--r--tests/zfs-tests/tests/functional/checksum/sha2_test.c14
16 files changed, 2 insertions, 263 deletions
diff --git a/cmd/zpool/os/freebsd/zpool_vdev_os.c b/cmd/zpool/os/freebsd/zpool_vdev_os.c
index 4a8d9272d..7d48f61a0 100644
--- a/cmd/zpool/os/freebsd/zpool_vdev_os.c
+++ b/cmd/zpool/os/freebsd/zpool_vdev_os.c
@@ -101,13 +101,3 @@ check_sector_size_database(char *path, int *sector_size)
{
return (0);
}
-
-void
-zpool_vdev_enable_file(struct stat64 *statbuf, boolean_t *wholedisk)
-{
- if (S_ISCHR(statbuf->st_mode)) {
- statbuf->st_mode &= ~S_IFCHR;
- statbuf->st_mode |= S_IFBLK;
- *wholedisk = B_FALSE;
- }
-}
diff --git a/include/os/freebsd/spl/acl/acl_common.h b/include/os/freebsd/spl/acl/acl_common.h
index 00a2a9dfe..44f5bed59 100644
--- a/include/os/freebsd/spl/acl/acl_common.h
+++ b/include/os/freebsd/spl/acl/acl_common.h
@@ -46,7 +46,6 @@ typedef struct trivial_acl {
extern int acltrivial(const char *);
extern void adjust_ace_pair(ace_t *pair, mode_t mode);
extern void adjust_ace_pair_common(void *, size_t, size_t, mode_t);
-extern int ace_trivial(ace_t *acep, int aclcnt);
extern int ace_trivial_common(void *, int,
uint64_t (*walk)(void *, uint64_t, int aclcnt, uint16_t *, uint16_t *,
uint32_t *mask));
diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h
index 7d5567db4..969856cc8 100644
--- a/include/sys/zfs_context.h
+++ b/include/sys/zfs_context.h
@@ -341,7 +341,6 @@ extern void cv_broadcast(kcondvar_t *cv);
*/
extern kstat_t *kstat_create(const char *, int,
const char *, const char *, uchar_t, ulong_t, uchar_t);
-extern void kstat_named_init(kstat_named_t *, const char *, uchar_t);
extern void kstat_install(kstat_t *);
extern void kstat_delete(kstat_t *);
extern void kstat_waitq_enter(kstat_io_t *);
diff --git a/lib/libshare/libshare.c b/lib/libshare/libshare.c
index 0965911cf..36074641d 100644
--- a/lib/libshare/libshare.c
+++ b/lib/libshare/libshare.c
@@ -767,11 +767,3 @@ sa_zfs_process_share(sa_handle_t handle, sa_group_t group, sa_share_t share,
return (process_share(impl_handle, impl_share, mountpoint, NULL,
proto, shareopts, NULL, dataset, B_FALSE));
}
-
-void
-sa_update_sharetab_ts(sa_handle_t handle)
-{
- sa_handle_impl_t impl_handle = (sa_handle_impl_t)handle;
-
- update_sharetab(impl_handle);
-}
diff --git a/lib/libspl/asm-generic/atomic.c b/lib/libspl/asm-generic/atomic.c
index 03f8ddcfa..f03f93609 100644
--- a/lib/libspl/asm-generic/atomic.c
+++ b/lib/libspl/asm-generic/atomic.c
@@ -48,7 +48,6 @@ pthread_mutex_t atomic_lock = PTHREAD_MUTEX_INITIALIZER;
VERIFY3S(pthread_mutex_unlock(&atomic_lock), ==, 0); \
}
-ATOMIC_INC(long, unsigned long)
ATOMIC_INC(8, uint8_t)
ATOMIC_INC(uchar, uchar_t)
ATOMIC_INC(16, uint16_t)
@@ -67,7 +66,6 @@ ATOMIC_INC(64, uint64_t)
VERIFY3S(pthread_mutex_unlock(&atomic_lock), ==, 0); \
}
-ATOMIC_DEC(long, unsigned long)
ATOMIC_DEC(8, uint8_t)
ATOMIC_DEC(uchar, uchar_t)
ATOMIC_DEC(16, uint16_t)
@@ -180,7 +178,6 @@ ATOMIC_AND(64, uint64_t)
return (rc); \
}
-ATOMIC_INC_NV(long, unsigned long)
ATOMIC_INC_NV(8, uint8_t)
ATOMIC_INC_NV(uchar, uchar_t)
ATOMIC_INC_NV(16, uint16_t)
@@ -201,7 +198,6 @@ ATOMIC_INC_NV(64, uint64_t)
return (rc); \
}
-ATOMIC_DEC_NV(long, unsigned long)
ATOMIC_DEC_NV(8, uint8_t)
ATOMIC_DEC_NV(uchar, uchar_t)
ATOMIC_DEC_NV(16, uint16_t)
@@ -286,7 +282,6 @@ atomic_sub_ptr_nv(volatile void *target, ssize_t bits)
return (rc); \
}
-ATOMIC_OR_NV(long, unsigned long)
ATOMIC_OR_NV(8, uint8_t)
ATOMIC_OR_NV(uchar, uchar_t)
ATOMIC_OR_NV(16, uint16_t)
@@ -307,7 +302,6 @@ ATOMIC_OR_NV(64, uint64_t)
return (rc); \
}
-ATOMIC_AND_NV(long, unsigned long)
ATOMIC_AND_NV(8, uint8_t)
ATOMIC_AND_NV(uchar, uchar_t)
ATOMIC_AND_NV(16, uint16_t)
@@ -454,47 +448,3 @@ membar_consumer(void)
{
/* XXX - Implement me */
}
-
-/* Legacy kernel interfaces; they will go away (eventually). */
-
-uint8_t
-cas8(uint8_t *target, uint8_t arg1, uint8_t arg2)
-{
- return (atomic_cas_8(target, arg1, arg2));
-}
-
-uint32_t
-cas32(uint32_t *target, uint32_t arg1, uint32_t arg2)
-{
- return (atomic_cas_32(target, arg1, arg2));
-}
-
-uint64_t
-cas64(uint64_t *target, uint64_t arg1, uint64_t arg2)
-{
- return (atomic_cas_64(target, arg1, arg2));
-}
-
-ulong_t
-caslong(ulong_t *target, ulong_t arg1, ulong_t arg2)
-{
- return (atomic_cas_ulong(target, arg1, arg2));
-}
-
-void *
-casptr(void *target, void *arg1, void *arg2)
-{
- return (atomic_cas_ptr(target, arg1, arg2));
-}
-
-void
-atomic_and_long(ulong_t *target, ulong_t bits)
-{
- return (atomic_and_ulong(target, bits));
-}
-
-void
-atomic_or_long(ulong_t *target, ulong_t bits)
-{
- return (atomic_or_ulong(target, bits));
-}
diff --git a/lib/libtpool/thread_pool.c b/lib/libtpool/thread_pool.c
index 267fa834b..892beeffa 100644
--- a/lib/libtpool/thread_pool.c
+++ b/lib/libtpool/thread_pool.c
@@ -597,56 +597,3 @@ tpool_member(tpool_t *tpool)
pthread_mutex_unlock(&tpool->tp_mutex);
return (0);
}
-
-void
-postfork1_child_tpool(void)
-{
- pthread_t my_tid = pthread_self();
- tpool_t *tpool;
- tpool_job_t *job;
-
- /*
- * All of the thread pool workers are gone, except possibly
- * for the current thread, if it is a thread pool worker thread.
- * Retain the thread pools, but make them all empty. Whatever
- * jobs were queued or running belong to the parent process.
- */
-top:
- if ((tpool = thread_pools) == NULL)
- return;
-
- do {
- tpool_active_t *activep;
-
- (void) pthread_mutex_init(&tpool->tp_mutex, NULL);
- (void) pthread_cond_init(&tpool->tp_busycv, NULL);
- (void) pthread_cond_init(&tpool->tp_workcv, NULL);
- (void) pthread_cond_init(&tpool->tp_waitcv, NULL);
- for (job = tpool->tp_head; job; job = tpool->tp_head) {
- tpool->tp_head = job->tpj_next;
- free(job);
- }
- tpool->tp_tail = NULL;
- tpool->tp_njobs = 0;
- for (activep = tpool->tp_active; activep;
- activep = activep->tpa_next) {
- if (activep->tpa_tid == my_tid) {
- activep->tpa_next = NULL;
- break;
- }
- }
- tpool->tp_idle = 0;
- tpool->tp_current = 0;
- if ((tpool->tp_active = activep) != NULL)
- tpool->tp_current = 1;
- tpool->tp_flags &= ~TP_WAIT;
- if (tpool->tp_flags & (TP_DESTROY | TP_ABANDON)) {
- tpool->tp_flags &= ~TP_DESTROY;
- tpool->tp_flags |= TP_ABANDON;
- if (tpool->tp_current == 0) {
- delete_pool(tpool);
- goto top; /* start over */
- }
- }
- } while ((tpool = tpool->tp_forw) != thread_pools);
-}
diff --git a/lib/libzfs/os/freebsd/libzfs_compat.c b/lib/libzfs/os/freebsd/libzfs_compat.c
index 3344d0e3d..5c3ccd28d 100644
--- a/lib/libzfs/os/freebsd/libzfs_compat.c
+++ b/lib/libzfs/os/freebsd/libzfs_compat.c
@@ -33,9 +33,6 @@
#include <sys/stat.h>
#include <sys/param.h>
-int zfs_ioctl_version = ZFS_IOCVER_UNDEF;
-// static int zfs_spa_version = -1;
-
void
libzfs_set_pipe_max(int infd)
{
@@ -173,38 +170,6 @@ execvpe(const char *name, char * const argv[], char * const envp[])
return (execvPe(name, path, argv, envp));
}
-#if 0
-/*
- * Get the SPA version
- */
-static int
-get_zfs_spa_version(void)
-{
- size_t ver_size;
- int ver = 0;
-
- ver_size = sizeof (ver);
- sysctlbyname("vfs.zfs.version.spa", &ver, &ver_size, NULL, 0);
-
- return (ver);
-}
-#endif
-
-/*
- * Get zfs_ioctl_version
- */
-int
-get_zfs_ioctl_version(void)
-{
- size_t ver_size;
- int ver = ZFS_IOCVER_NONE;
-
- ver_size = sizeof (ver);
- sysctlbyname("vfs.zfs.version.ioctl", &ver, &ver_size, NULL, 0);
-
- return (ver);
-}
-
const char *
libzfs_error_init(int error)
{
diff --git a/lib/libzfs/os/freebsd/libzfs_zmount.c b/lib/libzfs/os/freebsd/libzfs_zmount.c
index c0951c314..c6415b8b8 100644
--- a/lib/libzfs/os/freebsd/libzfs_zmount.c
+++ b/lib/libzfs/os/freebsd/libzfs_zmount.c
@@ -135,14 +135,3 @@ zfs_mount_delegation_check(void)
{
return (0);
}
-
-/*
- * Check if we are doing an overlay mount.
- * Returns B_TRUE if the mount would overlay, otherwise B_FALSE.
- */
-boolean_t
-zfs_mount_overlay_check(const char *mountpoint)
-{
- /* FreeBSD always allows overlay mounts. */
- return (B_FALSE);
-}
diff --git a/module/icp/include/sys/bitmap.h b/module/icp/include/sys/bitmap.h
index b1f6823e6..4e86ee70e 100644
--- a/module/icp/include/sys/bitmap.h
+++ b/module/icp/include/sys/bitmap.h
@@ -157,9 +157,9 @@ extern int odd_parity(ulong_t);
* to 0 otherwise.
*/
#define BT_ATOMIC_SET(bitmap, bitindex) \
- { atomic_or_long(&(BT_WIM(bitmap, bitindex)), BT_BIW(bitindex)); }
+ { atomic_or_ulong(&(BT_WIM(bitmap, bitindex)), BT_BIW(bitindex)); }
#define BT_ATOMIC_CLEAR(bitmap, bitindex) \
- { atomic_and_long(&(BT_WIM(bitmap, bitindex)), ~BT_BIW(bitindex)); }
+ { atomic_and_ulong(&(BT_WIM(bitmap, bitindex)), ~BT_BIW(bitindex)); }
#define BT_ATOMIC_SET_EXCL(bitmap, bitindex, result) \
{ result = atomic_set_long_excl(&(BT_WIM(bitmap, bitindex)), \
diff --git a/module/os/freebsd/spl/acl_common.c b/module/os/freebsd/spl/acl_common.c
index 8eea4695e..ee89c8233 100644
--- a/module/os/freebsd/spl/acl_common.c
+++ b/module/os/freebsd/spl/acl_common.c
@@ -1707,25 +1707,3 @@ ace_trivial_common(void *acep, int aclcnt,
}
return (0);
}
-
-uint64_t
-ace_walk(void *datap, uint64_t cookie, int aclcnt, uint16_t *flags,
- uint16_t *type, uint32_t *mask)
-{
- ace_t *acep = datap;
-
- if (cookie >= aclcnt)
- return (0);
-
- *flags = acep[cookie].a_flags;
- *type = acep[cookie].a_type;
- *mask = acep[cookie++].a_access_mask;
-
- return (cookie);
-}
-
-int
-ace_trivial(ace_t *acep, int aclcnt)
-{
- return (ace_trivial_common(acep, aclcnt, ace_walk));
-}
diff --git a/module/os/freebsd/spl/spl_kstat.c b/module/os/freebsd/spl/spl_kstat.c
index 1b149a544..234b56a49 100644
--- a/module/os/freebsd/spl/spl_kstat.c
+++ b/module/os/freebsd/spl/spl_kstat.c
@@ -288,22 +288,6 @@ kstat_delete(kstat_t *ksp)
}
void
-kstat_set_string(char *dst, const char *src)
-{
-
- bzero(dst, KSTAT_STRLEN);
- (void) strncpy(dst, src, KSTAT_STRLEN - 1);
-}
-
-void
-kstat_named_init(kstat_named_t *knp, const char *name, uchar_t data_type)
-{
-
- kstat_set_string(knp->name, name);
- knp->data_type = data_type;
-}
-
-void
kstat_waitq_enter(kstat_io_t *kiop)
{
hrtime_t new, delta;
diff --git a/module/os/linux/zfs/zfs_vnops.c b/module/os/linux/zfs/zfs_vnops.c
index acf3aca44..20c2709c9 100644
--- a/module/os/linux/zfs/zfs_vnops.c
+++ b/module/os/linux/zfs/zfs_vnops.c
@@ -4563,25 +4563,6 @@ zfs_inactive(struct inode *ip)
}
/*
- * Bounds-check the seek operation.
- *
- * IN: ip - inode seeking within
- * ooff - old file offset
- * noffp - pointer to new file offset
- *
- * RETURN: 0 if success
- * EINVAL if new offset invalid
- */
-/* ARGSUSED */
-int
-zfs_seek(struct inode *ip, offset_t ooff, offset_t *noffp)
-{
- if (S_ISDIR(ip->i_mode))
- return (0);
- return ((*noffp < 0 || *noffp > MAXOFFSET_T) ? EINVAL : 0);
-}
-
-/*
* Fill pages with data from the disk.
*/
static int
diff --git a/module/os/linux/zfs/zvol_os.c b/module/os/linux/zfs/zvol_os.c
index 12d448094..d1ce86c89 100644
--- a/module/os/linux/zfs/zvol_os.c
+++ b/module/os/linux/zfs/zvol_os.c
@@ -713,12 +713,6 @@ zvol_find_by_dev(dev_t dev)
return (NULL);
}
-void
-zvol_validate_dev(zvol_state_t *zv)
-{
- ASSERT3U(MINOR(zv->zv_zso->zvo_dev) & ZVOL_MINOR_MASK, ==, 0);
-}
-
static struct kobject *
zvol_probe(dev_t dev, int *part, void *arg)
{
diff --git a/module/zfs/ddt.c b/module/zfs/ddt.c
index 33dad8bdf..b94a9f54e 100644
--- a/module/zfs/ddt.c
+++ b/module/zfs/ddt.c
@@ -595,12 +595,6 @@ ddt_decompress(uchar_t *src, void *dst, size_t s_len, size_t d_len)
}
ddt_t *
-ddt_select_by_checksum(spa_t *spa, enum zio_checksum c)
-{
- return (spa->spa_ddt[c]);
-}
-
-ddt_t *
ddt_select(spa_t *spa, const blkptr_t *bp)
{
return (spa->spa_ddt[BP_GET_CHECKSUM(bp)]);
diff --git a/module/zfs/zrlock.c b/module/zfs/zrlock.c
index 6deb25648..a4def6053 100644
--- a/module/zfs/zrlock.c
+++ b/module/zfs/zrlock.c
@@ -157,15 +157,6 @@ zrl_exit(zrlock_t *zrl)
}
int
-zrl_refcount(zrlock_t *zrl)
-{
- ASSERT3S(zrl->zr_refcount, >, ZRL_DESTROYED);
-
- int n = (int)zrl->zr_refcount;
- return (n <= 0 ? 0 : n);
-}
-
-int
zrl_is_zero(zrlock_t *zrl)
{
ASSERT3S(zrl->zr_refcount, >, ZRL_DESTROYED);
diff --git a/tests/zfs-tests/tests/functional/checksum/sha2_test.c b/tests/zfs-tests/tests/functional/checksum/sha2_test.c
index 25a8d2bf3..5800002a6 100644
--- a/tests/zfs-tests/tests/functional/checksum/sha2_test.c
+++ b/tests/zfs-tests/tests/functional/checksum/sha2_test.c
@@ -172,20 +172,6 @@ const uint8_t sha512_256_test_digests[][32] = {
}
};
-/*
- * Local reimplementation of cmn_err, since it's used in sha2.c.
- */
-/*ARGSUSED*/
-void
-cmn_err(int level, char *format, ...)
-{
- va_list ap;
- va_start(ap, format);
- /* LINTED: E_SEC_PRINTF_VAR_FMT */
- (void) vfprintf(stderr, format, ap);
- va_end(ap);
-}
-
int
main(int argc, char *argv[])
{