zfs/module/os/freebsd/spl
Rob Norris b827625471 freebsd/kstat: replace existing kstat if name is reused
Normally, when trying to add a sysctl name that already exists, the
kernel rejects it with a warning. This changes the code to search for a
sysctl with the wanted name in same root. If it exists, it is destroyed,
allowing the new one to go in.

Arguably, a collision like this shouldn't ever happen, but during
import multiple vdev_t (and so vdev_queue_t, and so vdev_queue stats)
can exist at the same time for the same guid. There's no real way to
tell which is which without substantial refactoring in the import and
vdev init codepaths, whch is probably worthwhile but not for today.

Sponsored-by: Klara, Inc.
Sponsored-by: Syneto
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
2024-05-22 09:43:17 +10:00
..
acl_common.c acl: use uintptr_t for ace walker cookies 2022-11-03 09:51:34 -07:00
callb.c Cleanup: Use NULL when doing NULL pointer comparisons 2023-01-12 16:00:37 -08:00
list.c Remove list_size struct member from list implementation 2024-01-26 14:46:42 -08:00
spl_acl.c freebsd: remove __FBSDID macro use 2023-11-17 14:02:09 -08:00
spl_atomic.c freebsd: remove __FBSDID macro use 2023-11-17 14:02:09 -08:00
spl_cmn_err.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
spl_dtrace.c freebsd: remove __FBSDID macro use 2023-11-17 14:02:09 -08:00
spl_kmem.c freebsd: remove __FBSDID macro use 2023-11-17 14:02:09 -08:00
spl_kstat.c freebsd/kstat: replace existing kstat if name is reused 2024-05-22 09:43:17 +10:00
spl_misc.c freebsd: remove __FBSDID macro use 2023-11-17 14:02:09 -08:00
spl_policy.c freebsd: remove __FBSDID macro use 2023-11-17 14:02:09 -08:00
spl_procfs_list.c freebsd: remove __FBSDID macro use 2023-11-17 14:02:09 -08:00
spl_string.c Introduce kmem_scnprintf() 2022-10-29 13:05:11 -07:00
spl_sunddi.c freebsd: remove __FBSDID macro use 2023-11-17 14:02:09 -08:00
spl_sysevent.c freebsd: remove __FBSDID macro use 2023-11-17 14:02:09 -08:00
spl_taskq.c freebsd: remove __FBSDID macro use 2023-11-17 14:02:09 -08:00
spl_uio.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
spl_vfs.c FreeBSD: Fix ZFS so that snapshots under .zfs/snapshot are NFS visible 2023-11-27 16:31:03 -08:00
spl_vm.c freebsd: remove __FBSDID macro use 2023-11-17 14:02:09 -08:00
spl_zlib.c FreeBSD: Fix the build on FreeBSD 12 2023-11-27 12:58:03 -08:00
spl_zone.c freebsd: remove __FBSDID macro use 2023-11-17 14:02:09 -08:00