+enum volop {VOL_UPDATE, VOL_MKDIR, VOL_RMDIR, VOL_MKFILE, VOL_RMFILE};
+extern int hfs_volupdate(struct hfsmount *hfsmp, enum volop op, int inroot);
+
+int hfs_flushvolumeheader(struct hfsmount *hfsmp, int waitfor, int altflush);
+#define HFS_ALTFLUSH 1
+
+extern int hfs_extendfs(struct hfsmount *, u_int64_t, vfs_context_t);
+extern int hfs_truncatefs(struct hfsmount *, u_int64_t, vfs_context_t);
+extern int hfs_resize_progress(struct hfsmount *, u_int32_t *);
+
+/* If a runtime corruption is detected, mark the volume inconsistent
+ * bit in the volume attributes.
+ */
+void hfs_mark_volume_inconsistent(struct hfsmount *hfsmp);
+
+/*****************************************************************************
+ Functions from hfs_vfsutils.c
+******************************************************************************/
+u_int32_t BestBlockSizeFit(u_int32_t allocationBlockSize,
+ u_int32_t blockSizeLimit,
+ u_int32_t baseMultiple);
+
+OSErr hfs_MountHFSVolume(struct hfsmount *hfsmp, HFSMasterDirectoryBlock *mdb,
+ struct proc *p);
+OSErr hfs_MountHFSPlusVolume(struct hfsmount *hfsmp, HFSPlusVolumeHeader *vhp,
+ off_t embeddedOffset, u_int64_t disksize, struct proc *p, void *args, kauth_cred_t cred);
+
+extern int hfsUnmount(struct hfsmount *hfsmp, struct proc *p);
+
+extern int overflow_extents(struct filefork *fp);
+
+extern int hfs_owner_rights(struct hfsmount *hfsmp, uid_t cnode_uid, kauth_cred_t cred,
+ struct proc *p, int invokesuperuserstatus);
+
+
+/* HFS System file locking */
+#define SFL_CATALOG 0x0001
+#define SFL_EXTENTS 0x0002
+#define SFL_BITMAP 0x0004
+#define SFL_ATTRIBUTE 0x0008
+#define SFL_STARTUP 0x0010
+#define SFL_VALIDMASK (SFL_CATALOG | SFL_EXTENTS | SFL_BITMAP | SFL_ATTRIBUTE | SFL_STARTUP)
+
+extern int hfs_systemfile_lock(struct hfsmount *, int, enum hfslocktype);
+extern void hfs_systemfile_unlock(struct hfsmount *, int);
+
+extern u_int32_t GetFileInfo(ExtendedVCB *vcb, u_int32_t dirid, const char *name,
+ struct cat_attr *fattr, struct cat_fork *forkinfo);
+
+extern void hfs_remove_orphans(struct hfsmount *);
+
+u_int32_t GetLogicalBlockSize(struct vnode *vp);
+
+extern u_int32_t hfs_freeblks(struct hfsmount * hfsmp, int wantreserve);
+
+short MacToVFSError(OSErr err);
+
+/* HFS directory hint functions. */
+extern directoryhint_t * hfs_getdirhint(struct cnode *, int, int);
+extern void hfs_reldirhint(struct cnode *, directoryhint_t *);
+extern void hfs_reldirhints(struct cnode *, int);
+extern void hfs_insertdirhint(struct cnode *, directoryhint_t *);
+
+extern int hfs_namecmp(const u_int8_t *str1, size_t len1, const u_int8_t *str2, size_t len2);
+
+extern int hfs_early_journal_init(struct hfsmount *hfsmp, HFSPlusVolumeHeader *vhp,
+ void *_args, off_t embeddedOffset, daddr64_t mdb_offset,
+ HFSMasterDirectoryBlock *mdbp, kauth_cred_t cred);
+
+extern int hfs_virtualmetafile(struct cnode *);
+
+extern int hfs_start_transaction(struct hfsmount *hfsmp);
+extern int hfs_end_transaction(struct hfsmount *hfsmp);
+extern int hfs_journal_flush(struct hfsmount *hfsmp);
+extern void hfs_sync_ejectable(struct hfsmount *hfsmp);
+
+/* Erase unused Catalog nodes due to <rdar://problem/6947811>. */
+extern int hfs_erase_unused_nodes(struct hfsmount *hfsmp);
+
+
+/*****************************************************************************
+ Functions from hfs_vnops.c
+******************************************************************************/
+int hfs_write_access(struct vnode *vp, kauth_cred_t cred, struct proc *p, Boolean considerFlags);
+
+int hfs_chmod(struct vnode *vp, int mode, kauth_cred_t cred, struct proc *p);
+
+int hfs_chown(struct vnode *vp, uid_t uid, gid_t gid, kauth_cred_t cred, struct proc *p);
+
+#define kMaxSecsForFsync 5
+#define HFS_SYNCTRANS 1
+extern int hfs_btsync(struct vnode *vp, int sync_transaction);