mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
Remove dead code
Delete unused functions. Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu> Closes #10470
This commit is contained in:
committed by
Brian Behlendorf
parent
65c7cc49bf
commit
c3fe42aabd
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user