]> git.proxmox.com Git - mirror_zfs.git/commit - include/os/freebsd/spl/sys/mod_os.h
FreeBSD: Organize sysctls
authorRyan Moeller <ryan@iXsystems.com>
Tue, 9 Aug 2022 09:05:47 +0000 (09:05 +0000)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 2 Sep 2022 20:26:24 +0000 (13:26 -0700)
commit7bb707ffafbea79c5b2f9ea24959825a3c4b8802
treec2a414731d592ee4f584eac327e132e1c1d69e72
parent4723eba8c0af10fc25d9203ffa0cd4499b4a875d
FreeBSD: Organize sysctls

FreeBSD had a few platform-specific ARC tunables in the wrong place:

- Move FreeBSD-specifc ARC tunables into the same vfs.zfs.arc node as
  the rest of the ARC tunables.
- Move the handlers from arc_os.c to sysctl_os.c and add compat sysctls
  for the legacy names.

While here, some additional clean up:

- Most handlers are specific to a particular variable and don't need a
  pointer passed through the args.
- Group blocks of related variables, handlers, and sysctl declarations
  into logical sections.
- Match variable types for temporaries in handlers with the type of the
  global variable.
- Remove leftover comments.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #13756
include/os/freebsd/spl/sys/mod_os.h
module/os/freebsd/zfs/arc_os.c
module/os/freebsd/zfs/sysctl_os.c