+extern errno_t hfs_flush(struct hfsmount *hfsmp, hfs_flush_mode_t mode);
+
+extern void hfs_trim_callback(void *arg, uint32_t extent_count, const dk_extent_t *extents);
+
+/* Erase unused Catalog nodes due to <rdar://problem/6947811>. */
+extern int hfs_erase_unused_nodes(struct hfsmount *hfsmp);
+
+extern uint64_t hfs_usecs_to_deadline(uint64_t usecs);
+
+extern int hfs_freeze(struct hfsmount *hfsmp);
+extern int hfs_thaw(struct hfsmount *hfsmp, const struct proc *process);
+
+
+/*****************************************************************************
+ 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);
+
+extern void replace_desc(struct cnode *cp, struct cat_desc *cdp);
+
+extern int hfs_vgetrsrc(struct hfsmount *hfsmp, struct vnode *vp,
+ struct vnode **rvpp);
+
+typedef enum {
+ // Push all modifications to disk (including minor ones)
+ HFS_UPDATE_FORCE = 0x01,
+} hfs_update_options_t;
+
+extern int hfs_update(struct vnode *, int options);
+
+typedef enum hfs_sync_mode {
+ HFS_FSYNC,
+ HFS_FSYNC_FULL,
+ HFS_FSYNC_BARRIER
+} hfs_fsync_mode_t;
+
+extern int hfs_fsync(struct vnode *, int, hfs_fsync_mode_t, struct proc *);
+
+const struct cat_fork *
+hfs_prepare_fork_for_update(filefork_t *ff,
+ const struct cat_fork *cf,
+ struct cat_fork *cf_buf,
+ uint32_t block_size);
+
+/*****************************************************************************
+ Functions from hfs_xattr.c
+******************************************************************************/
+
+/*
+ * Maximum extended attribute size supported for all extended attributes except
+ * resource fork and finder info.
+ */
+#define HFS_XATTR_MAXSIZE INT32_MAX
+
+/* Number of bits used to represent maximum extended attribute size */
+#define HFS_XATTR_SIZE_BITS 31
+
+int hfs_attrkeycompare(HFSPlusAttrKey *searchKey, HFSPlusAttrKey *trialKey);
+int hfs_buildattrkey(u_int32_t fileID, const char *attrname, HFSPlusAttrKey *key);
+void hfs_xattr_init(struct hfsmount * hfsmp);
+int file_attribute_exist(struct hfsmount *hfsmp, uint32_t fileID);
+int init_attrdata_vnode(struct hfsmount *hfsmp);
+int hfs_xattr_read(vnode_t vp, const char *name, void *data, size_t *size);
+int hfs_getxattr_internal(cnode_t *, struct vnop_getxattr_args *,
+ struct hfsmount *, u_int32_t);
+int hfs_xattr_write(vnode_t vp, const char *name, const void *data, size_t size);
+int hfs_setxattr_internal(struct cnode *, const void *, size_t,
+ struct vnop_setxattr_args *, struct hfsmount *, u_int32_t);
+extern int hfs_removeallattr(struct hfsmount *hfsmp, u_int32_t fileid,
+ bool *open_transaction);
+extern int hfs_set_volxattr(struct hfsmount *hfsmp, unsigned int xattrtype, int state);
+
+
+
+/*****************************************************************************
+ Functions from hfs_link.c
+******************************************************************************/
+
+extern int hfs_unlink(struct hfsmount *hfsmp, struct vnode *dvp, struct vnode *vp,
+ struct componentname *cnp, int skip_reserve);
+extern int hfs_lookup_siblinglinks(struct hfsmount *hfsmp, cnid_t linkfileid,
+ cnid_t *prevlinkid, cnid_t *nextlinkid);
+extern int hfs_lookup_lastlink(struct hfsmount *hfsmp, cnid_t linkfileid,
+ cnid_t *nextlinkid, struct cat_desc *cdesc);
+extern void hfs_privatedir_init(struct hfsmount *, enum privdirtype);
+
+extern void hfs_savelinkorigin(cnode_t *cp, cnid_t parentcnid);
+extern void hfs_relorigins(struct cnode *cp);
+extern void hfs_relorigin(struct cnode *cp, cnid_t parentcnid);
+extern int hfs_haslinkorigin(cnode_t *cp);
+extern cnid_t hfs_currentparent(cnode_t *cp, bool have_lock);
+extern cnid_t hfs_currentcnid(cnode_t *cp);
+errno_t hfs_first_link(hfsmount_t *hfsmp, cnode_t *cp, cnid_t *link_id);
+
+
+/*****************************************************************************
+ Functions from VolumeAllocation.c
+ ******************************************************************************/
+extern int hfs_isallocated(struct hfsmount *hfsmp, u_int32_t startingBlock, u_int32_t numBlocks);
+
+extern int hfs_count_allocated(struct hfsmount *hfsmp, u_int32_t startBlock,
+ u_int32_t numBlocks, u_int32_t *alloc_count);
+
+extern int hfs_isrbtree_active (struct hfsmount *hfsmp);
+
+/*****************************************************************************
+ Functions from hfs_fsinfo.c
+ ******************************************************************************/
+extern errno_t hfs_get_fsinfo(struct hfsmount *hfsmp, void *a_data);
+extern void hfs_fsinfo_data_add(struct hfs_fsinfo_data *fsinfo, uint64_t entry);