mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +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
@@ -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)), \
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
@@ -287,22 +287,6 @@ kstat_delete(kstat_t *ksp)
|
||||
free(ksp, M_KSTAT);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -4562,25 +4562,6 @@ zfs_inactive(struct inode *ip)
|
||||
rw_exit(&zfsvfs->z_teardown_inactive_lock);
|
||||
}
|
||||
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -594,12 +594,6 @@ ddt_decompress(uchar_t *src, void *dst, size_t s_len, size_t d_len)
|
||||
byteswap_uint64_array(dst, 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)
|
||||
{
|
||||
|
||||
@@ -156,15 +156,6 @@ zrl_exit(zrlock_t *zrl)
|
||||
mutex_exit(&zrl->zr_mtx);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user