diff options
Diffstat (limited to 'include/os/freebsd/zfs/sys/zfs_vfsops_os.h')
-rw-r--r-- | include/os/freebsd/zfs/sys/zfs_vfsops_os.h | 87 |
1 files changed, 1 insertions, 86 deletions
diff --git a/include/os/freebsd/zfs/sys/zfs_vfsops_os.h b/include/os/freebsd/zfs/sys/zfs_vfsops_os.h index ccbbf4f73224..3e54f3e846f7 100644 --- a/include/os/freebsd/zfs/sys/zfs_vfsops_os.h +++ b/include/os/freebsd/zfs/sys/zfs_vfsops_os.h @@ -6,7 +6,7 @@ * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. + * or https://opensource.org/licenses/CDDL-1.0. * See the License for the specific language governing permissions * and limitations under the License. * @@ -27,40 +27,21 @@ #ifndef _SYS_FS_ZFS_VFSOPS_H #define _SYS_FS_ZFS_VFSOPS_H -#if __FreeBSD_version >= 1300125 -#define TEARDOWN_RMS -#endif - -#if __FreeBSD_version >= 1300109 -#define TEARDOWN_INACTIVE_RMS -#endif - #include <sys/dataset_kstats.h> #include <sys/list.h> #include <sys/vfs.h> #include <sys/zil.h> #include <sys/sa.h> #include <sys/rrwlock.h> -#ifdef TEARDOWN_INACTIVE_RMS #include <sys/rmlock.h> -#endif #include <sys/zfs_ioctl.h> #ifdef __cplusplus extern "C" { #endif -#ifdef TEARDOWN_RMS typedef struct rmslock zfs_teardown_lock_t; -#else -#define zfs_teardown_lock_t rrmlock_t -#endif - -#ifdef TEARDOWN_INACTIVE_RMS typedef struct rmslock zfs_teardown_inactive_lock_t; -#else -#define zfs_teardown_inactive_lock_t krwlock_t -#endif typedef struct zfsvfs zfsvfs_t; struct znode; @@ -93,7 +74,6 @@ struct zfsvfs { zfs_teardown_lock_t z_teardown_lock; zfs_teardown_inactive_lock_t z_teardown_inactive_lock; list_t z_all_znodes; /* all vnodes in the fs */ - uint64_t z_nr_znodes; /* number of znodes in the fs */ kmutex_t z_znodes_lock; /* lock for z_all_znodes */ struct zfsctl_root *z_ctldir; /* .zfs directory pointer */ boolean_t z_show_ctldir; /* expose .zfs in the root dir */ @@ -121,16 +101,12 @@ struct zfsvfs { struct task z_unlinked_drain_task; }; -#ifdef TEARDOWN_RMS #define ZFS_TEARDOWN_INIT(zfsvfs) \ rms_init(&(zfsvfs)->z_teardown_lock, "zfs teardown") #define ZFS_TEARDOWN_DESTROY(zfsvfs) \ rms_destroy(&(zfsvfs)->z_teardown_lock) -#define ZFS_TEARDOWN_TRY_ENTER_READ(zfsvfs) \ - rms_try_rlock(&(zfsvfs)->z_teardown_lock) - #define ZFS_TEARDOWN_ENTER_READ(zfsvfs, tag) \ rms_rlock(&(zfsvfs)->z_teardown_lock); @@ -154,42 +130,7 @@ struct zfsvfs { #define ZFS_TEARDOWN_HELD(zfsvfs) \ rms_owned_any(&(zfsvfs)->z_teardown_lock) -#else -#define ZFS_TEARDOWN_INIT(zfsvfs) \ - rrm_init(&(zfsvfs)->z_teardown_lock, B_FALSE) - -#define ZFS_TEARDOWN_DESTROY(zfsvfs) \ - rrm_destroy(&(zfsvfs)->z_teardown_lock) - -#define ZFS_TEARDOWN_TRY_ENTER_READ(zfsvfs) \ - rw_tryenter(&(zfsvfs)->z_teardown_lock, RW_READER) - -#define ZFS_TEARDOWN_ENTER_READ(zfsvfs, tag) \ - rrm_enter_read(&(zfsvfs)->z_teardown_lock, tag); - -#define ZFS_TEARDOWN_EXIT_READ(zfsvfs, tag) \ - rrm_exit(&(zfsvfs)->z_teardown_lock, tag) - -#define ZFS_TEARDOWN_ENTER_WRITE(zfsvfs, tag) \ - rrm_enter(&(zfsvfs)->z_teardown_lock, RW_WRITER, tag) - -#define ZFS_TEARDOWN_EXIT_WRITE(zfsvfs) \ - rrm_exit(&(zfsvfs)->z_teardown_lock, tag) - -#define ZFS_TEARDOWN_EXIT(zfsvfs, tag) \ - rrm_exit(&(zfsvfs)->z_teardown_lock, tag) -#define ZFS_TEARDOWN_READ_HELD(zfsvfs) \ - RRM_READ_HELD(&(zfsvfs)->z_teardown_lock) - -#define ZFS_TEARDOWN_WRITE_HELD(zfsvfs) \ - RRM_WRITE_HELD(&(zfsvfs)->z_teardown_lock) - -#define ZFS_TEARDOWN_HELD(zfsvfs) \ - RRM_LOCK_HELD(&(zfsvfs)->z_teardown_lock) -#endif - -#ifdef TEARDOWN_INACTIVE_RMS #define ZFS_TEARDOWN_INACTIVE_INIT(zfsvfs) \ rms_init(&(zfsvfs)->z_teardown_inactive_lock, "zfs teardown inactive") @@ -213,31 +154,6 @@ struct zfsvfs { #define ZFS_TEARDOWN_INACTIVE_WRITE_HELD(zfsvfs) \ rms_wowned(&(zfsvfs)->z_teardown_inactive_lock) -#else -#define ZFS_TEARDOWN_INACTIVE_INIT(zfsvfs) \ - rw_init(&(zfsvfs)->z_teardown_inactive_lock, NULL, RW_DEFAULT, NULL) - -#define ZFS_TEARDOWN_INACTIVE_DESTROY(zfsvfs) \ - rw_destroy(&(zfsvfs)->z_teardown_inactive_lock) - -#define ZFS_TEARDOWN_INACTIVE_TRY_ENTER_READ(zfsvfs) \ - rw_tryenter(&(zfsvfs)->z_teardown_inactive_lock, RW_READER) - -#define ZFS_TEARDOWN_INACTIVE_ENTER_READ(zfsvfs) \ - rw_enter(&(zfsvfs)->z_teardown_inactive_lock, RW_READER) - -#define ZFS_TEARDOWN_INACTIVE_EXIT_READ(zfsvfs) \ - rw_exit(&(zfsvfs)->z_teardown_inactive_lock) - -#define ZFS_TEARDOWN_INACTIVE_ENTER_WRITE(zfsvfs) \ - rw_enter(&(zfsvfs)->z_teardown_inactive_lock, RW_WRITER) - -#define ZFS_TEARDOWN_INACTIVE_EXIT_WRITE(zfsvfs) \ - rw_exit(&(zfsvfs)->z_teardown_inactive_lock) - -#define ZFS_TEARDOWN_INACTIVE_WRITE_HELD(zfsvfs) \ - RW_WRITE_HELD(&(zfsvfs)->z_teardown_inactive_lock) -#endif #define ZSB_XATTR 0x0001 /* Enable user xattrs */ /* @@ -291,7 +207,6 @@ typedef struct zfid_long { #define SHORT_FID_LEN (sizeof (zfid_short_t) - sizeof (uint16_t)) #define LONG_FID_LEN (sizeof (zfid_long_t) - sizeof (uint16_t)) -extern uint_t zfs_fsyncer_key; extern int zfs_super_owner; extern void zfs_init(void); |