+/* bdevvp moved to vnode.h as private KPI */
+void cvtstat(struct stat *st, struct ostat *ost);
+void vprint(const char *label, struct vnode *vp);
+
+
+__private_extern__ int set_package_extensions_table(user_addr_t data, int nentries, int maxwidth);
+int vn_rdwr_64(enum uio_rw rw, struct vnode *vp, uint64_t base,
+ int64_t len, off_t offset, enum uio_seg segflg,
+ int ioflg, kauth_cred_t cred, int64_t *aresid,
+ struct proc *p);
+#if CONFIG_MACF
+int vn_setlabel(struct vnode *vp, struct label *intlabel,
+ vfs_context_t context);
+#endif
+void fifo_printinfo(struct vnode *vp);
+int vn_open(struct nameidata *ndp, int fmode, int cmode);
+int vn_open_modflags(struct nameidata *ndp, int *fmode, int cmode);
+int vn_open_auth(struct nameidata *ndp, int *fmode, struct vnode_attr *);
+int vn_close(vnode_t, int flags, vfs_context_t ctx);
+errno_t vn_remove(vnode_t dvp, vnode_t *vpp, struct nameidata *ndp, int32_t flags, struct vnode_attr *vap, vfs_context_t ctx);
+errno_t vn_rename(struct vnode *fdvp, struct vnode **fvpp, struct componentname *fcnp, struct vnode_attr *fvap,
+ struct vnode *tdvp, struct vnode **tvpp, struct componentname *tcnp, struct vnode_attr *tvap,
+ uint32_t flags, vfs_context_t ctx);
+
+void lock_vnode_and_post(vnode_t, int);
+
+#define post_event_if_success(_vp, _error, _event) \
+ do { \
+ if (0 == (_error)) { \
+ lock_vnode_and_post((_vp), (_event)); \
+ } \
+ } while (0)
+
+/* Authorization subroutines */
+int vn_authorize_open_existing(vnode_t vp, struct componentname *cnp, int fmode, vfs_context_t ctx, void *reserved);
+int vn_authorize_create(vnode_t, struct componentname *, struct vnode_attr *, vfs_context_t, void*);
+int vn_attribute_prepare(vnode_t dvp, struct vnode_attr *vap, uint32_t *defaulted_fieldsp, vfs_context_t ctx);
+void vn_attribute_cleanup(struct vnode_attr *vap, uint32_t defaulted_fields);
+int vn_authorize_rename(struct vnode *fdvp, struct vnode *fvp, struct componentname *fcnp,
+ struct vnode *tdvp, struct vnode *tvp, struct componentname *tcnp,
+ vfs_context_t ctx, void *reserved);
+int vn_authorize_renamex(struct vnode *fdvp, struct vnode *fvp, struct componentname *fcnp,
+ struct vnode *tdvp, struct vnode *tvp, struct componentname *tcnp,
+ vfs_context_t ctx, vfs_rename_flags_t flags, void *reserved);
+int vn_authorize_renamex_with_paths(struct vnode *fdvp, struct vnode *fvp, struct componentname *fcnp, const char *from_path,
+ struct vnode *tdvp, struct vnode *tvp, struct componentname *tcnp, const char *to_path,
+ vfs_context_t ctx, vfs_rename_flags_t flags, void *reserved);
+int vn_authorize_rmdir(vnode_t dvp, vnode_t vp, struct componentname *cnp, vfs_context_t ctx, void *reserved);
+
+typedef int (*vn_create_authorizer_t)(vnode_t, struct componentname *, struct vnode_attr *, vfs_context_t, void*);
+int vn_authorize_mkdir(vnode_t, struct componentname *, struct vnode_attr *, vfs_context_t, void*);
+int vn_authorize_null(vnode_t, struct componentname *, struct vnode_attr *, vfs_context_t, void*);
+int vnode_attr_authorize_dir_clone(struct vnode_attr *vap, kauth_action_t action,
+ struct vnode_attr *dvap, vnode_t sdvp, mount_t mp, dir_clone_authorizer_op_t vattr_op,
+ uint32_t flags, vfs_context_t ctx, void *reserved);
+/* End of authorization subroutines */
+
+#define VN_CREATE_NOAUTH (1<<0)
+#define VN_CREATE_NOINHERIT (1<<1)
+#define VN_CREATE_UNION (1<<2)
+#define VN_CREATE_NOLABEL (1<<3)
+#define VN_CREATE_DOOPEN (1<<4) /* Open file if a batched operation is available */
+errno_t vn_create(vnode_t, vnode_t *, struct nameidata *, struct vnode_attr *, uint32_t, int, uint32_t*, vfs_context_t);
+int vn_mkdir(vnode_t dvp, vnode_t *vpp, struct nameidata *ndp, struct vnode_attr *vap, vfs_context_t ctx);
+int vn_rmdir(vnode_t dvp, vnode_t *vpp, struct nameidata *ndp, struct vnode_attr *vap, vfs_context_t ctx);
+
+int vn_getxattr(vnode_t, const char *, uio_t, size_t *, int, vfs_context_t);
+int vn_setxattr(vnode_t, const char *, uio_t, int, vfs_context_t);
+int vn_removexattr(vnode_t, const char *, int, vfs_context_t);
+int vn_listxattr(vnode_t, uio_t, size_t *, int, vfs_context_t);
+
+#if NAMEDSTREAMS
+errno_t vnode_getnamedstream(vnode_t, vnode_t *, const char *, enum nsoperation, int, vfs_context_t);
+errno_t vnode_makenamedstream(vnode_t, vnode_t *, const char *, int, vfs_context_t);
+errno_t vnode_removenamedstream(vnode_t, vnode_t, const char *, int, vfs_context_t);
+errno_t vnode_flushnamedstream(vnode_t vp, vnode_t svp, vfs_context_t context);
+errno_t vnode_relenamedstream(vnode_t vp, vnode_t svp);
+errno_t vnode_verifynamedstream(vnode_t vp);
+#endif
+
+
+void nchinit(void);
+int resize_namecache(int newsize);
+void name_cache_lock_shared(void);
+void name_cache_lock(void);
+void name_cache_unlock(void);
+void cache_enter_with_gen(vnode_t dvp, vnode_t vp, struct componentname *cnp, int gen);
+const char *cache_enter_create(vnode_t dvp, vnode_t vp, struct componentname *cnp);
+
+extern int nc_disabled;
+
+#define vnode_lock_convert(v) lck_mtx_convert_spin(&(v)->v_lock)
+
+void vnode_lock_spin(vnode_t);
+
+
+void vnode_list_lock(void);
+void vnode_list_unlock(void);
+
+#define VNODE_REF_FORCE 0x1
+int vnode_ref_ext(vnode_t, int, int);
+
+void vnode_rele_internal(vnode_t, int, int, int);
+#ifdef BSD_KERNEL_PRIVATE
+int vnode_getalways(vnode_t);
+int vget_internal(vnode_t, int, int);
+errno_t vnode_getiocount(vnode_t, unsigned int, int);
+#endif /* BSD_KERNEL_PRIVATE */
+int vnode_get_locked(vnode_t);
+int vnode_put_locked(vnode_t);
+
+int vnode_issock(vnode_t);
+int vnode_isaliased(vnode_t);
+
+void unlock_fsnode(vnode_t, int *);
+int lock_fsnode(vnode_t, int *);
+
+errno_t vnode_resume(vnode_t);
+errno_t vnode_suspend(vnode_t);
+
+
+errno_t vnode_mtime(vnode_t, struct timespec *, vfs_context_t);
+errno_t vnode_flags(vnode_t, uint32_t *, vfs_context_t);
+
+errno_t vnode_size(vnode_t, off_t *, vfs_context_t);
+errno_t vnode_setsize(vnode_t, off_t, int ioflag, vfs_context_t);
+int vnode_setattr_fallback(vnode_t vp, struct vnode_attr *vap, vfs_context_t ctx);
+int vnode_isspec(vnode_t vp);
+
+
+#ifdef BSD_KERNEL_PRIVATE
+
+typedef uint32_t compound_vnop_id_t;
+#define COMPOUND_VNOP_OPEN 0x01
+#define COMPOUND_VNOP_MKDIR 0x02
+#define COMPOUND_VNOP_RENAME 0x04
+#define COMPOUND_VNOP_REMOVE 0x08
+#define COMPOUND_VNOP_RMDIR 0x10
+
+int vnode_compound_rename_available(vnode_t vp);
+int vnode_compound_rmdir_available(vnode_t vp);
+int vnode_compound_mkdir_available(vnode_t vp);
+int vnode_compound_remove_available(vnode_t vp);
+int vnode_compound_open_available(vnode_t vp);
+int vnode_compound_op_available(vnode_t, compound_vnop_id_t);
+#endif /* BSD_KERNEL_PRIVATE */
+
+void vn_setunionwait(vnode_t);
+void vn_checkunionwait(vnode_t);
+void vn_clearunionwait(vnode_t, int);