diff options
author | Allan Jude <[email protected]> | 2020-06-05 20:17:02 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2020-06-05 17:17:02 -0700 |
commit | 4547fc4e071ceb1818b3a46c3035b923e06e5390 (patch) | |
tree | d5754d84d30f9a1eb63d963e00158a2bdb8a6dbd /include | |
parent | 99b281f1ae3833826b4e3cee4126a4ea5e6de987 (diff) |
Connect dataset_kstats for FreeBSD
Expand the FreeBSD spl for kstats to support all current types
Move the dataset_kstats_t back to zvol_state_t from zfs_state_os_t
now that it is common once again
```
kstat.zfs/mypool.dataset.objset-0x10b.nunlinked: 0
kstat.zfs/mypool.dataset.objset-0x10b.nunlinks: 0
kstat.zfs/mypool.dataset.objset-0x10b.nread: 150528
kstat.zfs/mypool.dataset.objset-0x10b.reads: 48
kstat.zfs/mypool.dataset.objset-0x10b.nwritten: 134217728
kstat.zfs/mypool.dataset.objset-0x10b.writes: 1024
kstat.zfs/mypool.dataset.objset-0x10b.dataset_name: mypool/datasetname
```
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed by: Sean Eric Fagan <[email protected]>
Reviewed-by: Serapheim Dimitropoulos <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Allan Jude <[email protected]>
Closes #10386
Diffstat (limited to 'include')
-rw-r--r-- | include/os/freebsd/zfs/sys/zfs_vfsops.h | 2 | ||||
-rw-r--r-- | include/sys/zvol_impl.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/include/os/freebsd/zfs/sys/zfs_vfsops.h b/include/os/freebsd/zfs/sys/zfs_vfsops.h index d17b80330..26652004b 100644 --- a/include/os/freebsd/zfs/sys/zfs_vfsops.h +++ b/include/os/freebsd/zfs/sys/zfs_vfsops.h @@ -27,6 +27,7 @@ #ifndef _SYS_FS_ZFS_VFSOPS_H #define _SYS_FS_ZFS_VFSOPS_H +#include <sys/dataset_kstats.h> #include <sys/list.h> #include <sys/vfs.h> #include <sys/zil.h> @@ -82,6 +83,7 @@ struct zfsvfs { uint8_t z_xattr; /* xattr type in use */ uint64_t z_version; /* ZPL version */ uint64_t z_shares_dir; /* hidden shares dir */ + dataset_kstats_t z_kstat; /* fs kstats */ kmutex_t z_lock; uint64_t z_userquota_obj; uint64_t z_groupquota_obj; diff --git a/include/sys/zvol_impl.h b/include/sys/zvol_impl.h index 845eb04bc..36199c311 100644 --- a/include/sys/zvol_impl.h +++ b/include/sys/zvol_impl.h @@ -49,6 +49,7 @@ typedef struct zvol_state { zilog_t *zv_zilog; /* ZIL handle */ zfs_rangelock_t zv_rangelock; /* for range locking */ dnode_t *zv_dn; /* dnode hold */ + dataset_kstats_t zv_kstat; /* zvol kstats */ list_node_t zv_next; /* next zvol_state_t linkage */ uint64_t zv_hash; /* name hash */ struct hlist_node zv_hlink; /* hash link */ |