zfs: Emit warning upon use of legacy sysctls
The introduction of OpenZFS moved some sysctls, and legacy compat shims
were added. For example:
Old (legacy) name: vfs.zfs.min_auto_ashift
New name: vfs.zfs.vdev.min_auto_ashift
Upstream OpenZFS removed these, but we've temporarily restored them in
FreeBSD.
Note that l2arc sysctls use generic sysctl functions (e.g. SYSCTL_UQUAD)
and thus cannot trivially have warnings added, so they are not handled.
PR: 266374
Reviewed by: jlduran
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53033
(cherry picked from commit 654a3aa9a1de176648eec00b3c201c33b10bd325)
(cherry picked from commit f0033878b92e1a00120fec4edf590715f7c4ecbc)