+/*!
+ * @function vfs_fsadd
+ * @abstract Register a filesystem with VFS.
+ * @discussion Typically called by a filesystem Kernel Extension when it is loaded.
+ * @param vfe Filesystem information: table of vfs operations, list of vnode operation tables,
+ * filesystem type number (can be omitted with VFS_TBLNOTYPENUM flag), name, flags.
+ * @param handle Opaque handle which will be passed to vfs_fsremove.
+ * @return 0 for success, else an error code.
+ */
+int vfs_fsadd(struct vfs_fsentry *vfe, vfstable_t *handle);
+
+/*!
+ * @function vfs_fsremove
+ * @abstract Unregister a filesystem with VFS.
+ * @discussion Typically called by a filesystem Kernel Extension when it is unloaded.
+ * @param handle Handle which was returned by vfs_fsadd.
+ * @return 0 for success, else an error code.
+ */
+int vfs_fsremove(vfstable_t handle);
+
+/*!
+ * @function vfs_iterate
+ * @abstract Iterate over all mountpoints with a callback. Used, for example, by sync().
+ * @param flags Unused.
+ * @param callout Function which takes a mount and arbitrary passed-in "arg," and returns one of VFS_RETURNED_DONE or VFS_CLAIMED_DONE: end
+ * iteration and return success. VFS_RETURNED or VFS_CLAIMED: continue iterating. Anything else: continue iterating.
+ * @param arg Arbitrary data to pass to callback.
+ * @return 0 for success, else an error code.
+ */
+int vfs_iterate(int flags, int (*callout)(struct mount *, void *), void *arg);
+
+/*!
+ * @function vfs_init_io_attributes
+ * @abstract Set I/O attributes on a mountpoint based on device properties.
+ * @param devvp Block device vnode from which a filesystem is being mounted.
+ * @param mp Mountpoint whose I/O parameters to initialize.
+ * @return 0 for success, else an error code.
+ */
+int vfs_init_io_attributes(vnode_t devvp, mount_t mp);
+
+/*!
+ * @function vfs_flags
+ * @abstract Retrieve mount flags.
+ * @discussion Results will be in the bitwise "OR" of MNT_VISFLAGMASK and MNT_CMDFLAGS.
+ * @param mp Mount whose flags to grab.
+ * @return Flags.
+ */
+uint64_t vfs_flags(mount_t mp);
+
+/*!
+ * @function vfs_setflags
+ * @abstract Set flags on a mount.
+ * @discussion Sets mount flags to the bitwise "OR" of their current value and the specified bits. Often
+ * used by a filesystem as part of the mount process.
+ * @param mp Mount whose flags to set.
+ * @param flags Flags to activate. Must be in the bitwise "OR" of MNT_VISFLAGMASK and MNT_CMDFLAGS.
+ */
+void vfs_setflags(mount_t mp, uint64_t flags);
+
+/*!
+ * @function vfs_clearflags
+ * @abstract Clear flags on a mount.
+ * @discussion Sets mount flags to the bitwise "AND" of their current value and the complement of the specified bits.
+ * @param mp Mount whose flags to set.
+ * @param flags Flags to deactivate. Must be in the bitwise "OR" of MNT_VISFLAGMASK and MNT_CMDFLAGS.
+ */
+void vfs_clearflags(mount_t mp, uint64_t flags);
+
+/*!
+ * @function vfs_issynchronous
+ * @abstract Determine if writes to a filesystem occur synchronously.
+ * @param mp Mount to test.
+ * @return Nonzero if writes occur synchronously, else 0.
+ */
+int vfs_issynchronous(mount_t mp);
+
+/*!
+ * @function vfs_iswriteupgrade
+ * @abstract Determine if a filesystem is mounted read-only but a request has been made to upgrade
+ * to read-write.
+ * @param mp Mount to test.
+ * @return Nonzero if a request has been made to update from read-only to read-write, else 0.
+ */
+int vfs_iswriteupgrade(mount_t mp);
+
+/*!
+ * @function vfs_isupdate
+ * @abstract Determine if a mount update is in progress.
+ * @param mp Mount to test.
+ * @return Nonzero if a mount update is in progress, 0 otherwise.
+ */
+int vfs_isupdate(mount_t mp);
+
+/*!
+ * @function vfs_isreload
+ * @abstract Determine if a reload of filesystem data is in progress. This can only be the case
+ * for a read-only filesystem; all data is brought in from secondary storage.
+ * @param mp Mount to test.
+ * @return Nonzero if a request has been made to reload data, else 0.
+ */
+int vfs_isreload(mount_t mp);
+
+/*!
+ * @function vfs_isforce
+ * @abstract Determine if a forced unmount is in progress.
+ * @discussion A forced unmount invalidates open files.
+ * @param mp Mount to test.
+ * @return Nonzero if a request has been made to forcibly unmount, else 0.
+ */
+int vfs_isforce(mount_t mp);
+
+/*!
+ * @function vfs_isunmount
+ * @abstract Determine if an unmount is in progress.
+ * @discussion This is an unsynchronized snapshot of the mount state. It should only be called
+ * if the mount is known to be valid, e.g. there are known to be live files on that volume.
+ * @param mp Mount to test.
+ * @return Nonzero if an unmount is in progress, else zero.
+ */
+int vfs_isunmount(mount_t mp);
+
+/*!
+ * @function vfs_isrdonly
+ * @abstract Determine if a filesystem is mounted read-only.
+ * @param mp Mount to test.
+ * @return Nonzero if filesystem is mounted read-only, else 0.
+ */
+int vfs_isrdonly(mount_t mp);
+
+/*!
+ * @function vfs_isrdwr
+ * @abstract Determine if a filesystem is mounted with writes enabled.
+ * @param mp Mount to test.
+ * @return Nonzero if filesystem is mounted read-write, else 0.
+ */
+int vfs_isrdwr(mount_t mp);
+
+/*!
+ * @function vfs_authopaque
+ * @abstract Determine if a filesystem's authorization decisions occur remotely.
+ * @param mp Mount to test.
+ * @return Nonzero if filesystem authorization is controlled remotely, else 0.
+ */
+int vfs_authopaque(mount_t mp);
+
+/*!
+ * @function vfs_authopaqueaccess
+ * @abstract Check if a filesystem is marked as having reliable remote VNOP_ACCESS support.
+ * @param mp Mount to test.
+ * @return Nonzero if VNOP_ACCESS is supported remotely, else 0.
+ */
+int vfs_authopaqueaccess(mount_t mp);
+
+/*!
+ * @function vfs_setauthopaque
+ * @abstract Mark a filesystem as having authorization decisions controlled remotely.
+ * @param mp Mount to mark.
+ */
+void vfs_setauthopaque(mount_t mp);
+
+/*!
+ * @function vfs_setauthopaqueaccess
+ * @abstract Mark a filesystem as having remote VNOP_ACCESS support.
+ * @param mp Mount to mark.
+ */
+void vfs_setauthopaqueaccess(mount_t mp);
+
+/*!
+ * @function vfs_clearauthopaque
+ * @abstract Mark a filesystem as not having remote authorization decisions.
+ * @param mp Mount to mark.
+ */
+void vfs_clearauthopaque(mount_t mp);
+
+/*!
+ * @function vfs_clearauthopaque
+ * @abstract Mark a filesystem as not having remote VNOP_ACCESS support.
+ * @param mp Mount to mark.
+ */
+void vfs_clearauthopaqueaccess(mount_t mp);
+
+/*!
+ * @function vfs_setextendedsecurity
+ * @abstract Mark a filesystem as supporting security controls beyond POSIX permissions.
+ * @discussion Specific controls include ACLs, file owner UUIDs, and group UUIDs.
+ * @param mp Mount to test.
+ */
+void vfs_setextendedsecurity(mount_t mp);
+
+/*!
+ * @function vfs_clearextendedsecurity
+ * @abstract Mark a filesystem as NOT supporting security controls beyond POSIX permissions.
+ * @discussion Specific controls include ACLs, file owner UUIDs, and group UUIDs.
+ * @param mp Mount to test.
+ */
+void vfs_clearextendedsecurity(mount_t mp);
+
+/*!
+ * @function vfs_setnoswap
+ * @abstract Mark a filesystem as unable to use swap files.
+ * @param mp Mount to mark.
+ */
+void vfs_setnoswap(mount_t mp);
+
+/*!
+ * @function vfs_clearnoswap
+ * @abstract Mark a filesystem as capable of using swap files.
+ * @param mp Mount to mark.
+ */
+void vfs_clearnoswap(mount_t mp);
+
+/*!
+ * @function vfs_setlocklocal
+ * @abstract Mark a filesystem as using VFS-level advisory locking support.
+ * @discussion Advisory locking operations will not call down to the filesystem if this flag is set.
+ * @param mp Mount to mark.
+ */
+void vfs_setlocklocal(mount_t mp);
+
+/*!
+ * @function vfs_authcache_ttl
+ * @abstract Determine the time-to-live of cached authorized credentials for files in this filesystem.
+ * @discussion If a filesystem is set to allow caching credentials, the VFS layer can authorize
+ * previously-authorized actions from the same vfs_context_t without calling down to the filesystem (though
+ * it will not deny based on the cache).
+ * @param mp Mount for which to check cache lifetime.
+ * @return Cache lifetime in seconds. CACHED_RIGHT_INFINITE_TTL indicates that credentials never expire.
+ */
+int vfs_authcache_ttl(mount_t mp);
+
+/*!
+ * @function vfs_setauthcache_ttl
+ * @abstract Enable credential caching and set time-to-live of cached authorized credentials for files in this filesystem.
+ * @discussion If a filesystem is set to allow caching credentials, the VFS layer can authorize
+ * previously-authorized actions from the same vfs_context_t without calling down to the filesystem (though
+ * it will not deny based on the cache).
+ * @param mp Mount for which to set cache lifetime.
+ */
+void vfs_setauthcache_ttl(mount_t mp, int ttl);
+
+/*!
+ * @function vfs_clearauthcache_ttl
+ * @abstract Remove time-to-live controls for cached credentials on a filesytem. Filesystems with remote authorization
+ * decisions (opaque) will still have KAUTH_VNODE_SEARCH rights cached for a default of CACHED_LOOKUP_RIGHT_TTL seconds.
+ * @param mp Mount for which to clear cache lifetime.
+ */
+void vfs_clearauthcache_ttl(mount_t mp);