aboutsummaryrefslogtreecommitdiffstats
path: root/module/os/freebsd
diff options
context:
space:
mode:
authorRyan Moeller <[email protected]>2020-10-08 12:40:23 -0400
committerGitHub <[email protected]>2020-10-08 09:40:23 -0700
commit73989f4b9ec3b550bdd10ba8ba2ab64b91e4e71b (patch)
tree91d6b1608170bf5bbb4c1d6fdbc593b974384af5 /module/os/freebsd
parent82b81a2acd92cb43322bc572d2e547b66e456cd9 (diff)
Make dbufstat work on FreeBSD
With procfs_list kstats implemented for FreeBSD, dbufs are now exposed as kstat.zfs.misc.dbufs. On FreeBSD, dbufstats can use the sysctl instead of procfs when no input file has been given. Enable the dbufstats tests on FreeBSD. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #11008
Diffstat (limited to 'module/os/freebsd')
-rw-r--r--module/os/freebsd/spl/spl_kstat.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/module/os/freebsd/spl/spl_kstat.c b/module/os/freebsd/spl/spl_kstat.c
index 4cc77e20a..b26753bac 100644
--- a/module/os/freebsd/spl/spl_kstat.c
+++ b/module/os/freebsd/spl/spl_kstat.c
@@ -231,6 +231,7 @@ restart:
}
free(ksp->ks_raw_buf, M_TEMP);
mutex_exit(ksp->ks_lock);
+ sbuf_trim(sb);
rc = sbuf_finish(sb);
if (rc == 0)
rc = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb));