summaryrefslogtreecommitdiffstats
path: root/sys/fs/ext2fs/ext2_extern.h
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2013-07-06 18:28:06 +0000
committerpfg <pfg@FreeBSD.org>2013-07-06 18:28:06 +0000
commit73bb131f8440db1f4cfc84c31dd7660a32333983 (patch)
treeef2ec6cef63cebe56cc828070a93f1f6323b646a /sys/fs/ext2fs/ext2_extern.h
parentff9d9c2784c90733b4c5eb073e7f941870523044 (diff)
downloadFreeBSD-src-73bb131f8440db1f4cfc84c31dd7660a32333983.zip
FreeBSD-src-73bb131f8440db1f4cfc84c31dd7660a32333983.tar.gz
Initial implementation of the HTree directory index.
This is a port of NetBSD's GSoC 2012 Ext3 HTree directory indexing by Vyacheslav Matyushin. It was cleaned up and enhanced for FreeBSD by Zheng Liu (lz@). This is an excellent example of work shared among different projects: Vyacheslav was able to look at an early prototype from Zheng Liu who was also able to check the code from Haiku (with permission). As in linux, the feature is not available by default and must be enabled explicitly with tune2fs. We still do not support the workarounds required in readdir for NFS. Submitted by: Zheng Liu Tested by: Mike Ma Sponsored by: Google Inc. MFC after: 1 week
Diffstat (limited to 'sys/fs/ext2fs/ext2_extern.h')
-rw-r--r--sys/fs/ext2fs/ext2_extern.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/fs/ext2fs/ext2_extern.h b/sys/fs/ext2fs/ext2_extern.h
index df5ff84..f9c87cb 100644
--- a/sys/fs/ext2fs/ext2_extern.h
+++ b/sys/fs/ext2fs/ext2_extern.h
@@ -40,12 +40,15 @@
#define _FS_EXT2FS_EXT2_EXTERN_H_
struct ext2fs_dinode;
+struct ext2fs_direct_2;
+struct ext2fs_searchslot;
struct indir;
struct inode;
struct mount;
struct vfsconf;
struct vnode;
+int ext2_add_entry(struct vnode *, struct ext2fs_direct_2 *);
int ext2_alloc(struct inode *,
int32_t, int32_t, int, struct ucred *, int32_t *);
int ext2_balloc(struct inode *,
@@ -81,6 +84,18 @@ int ext2_dirempty(struct inode *, ino_t, struct ucred *);
int ext2_checkpath(struct inode *, struct inode *, struct ucred *);
int cg_has_sb(int i);
int ext2_inactive(struct vop_inactive_args *);
+int ext2_htree_add_entry(struct vnode *, struct ext2fs_direct_2 *,
+ struct componentname *);
+int ext2_htree_create_index(struct vnode *, struct componentname *,
+ struct ext2fs_direct_2 *);
+int ext2_htree_has_idx(struct inode *);
+int ext2_htree_hash(const char *, int, uint32_t *, int, uint32_t *,
+ uint32_t *);
+int ext2_htree_lookup(struct inode *, const char *, int, struct buf **,
+ int *, doff_t *, doff_t *, doff_t *, struct ext2fs_searchslot *);
+int ext2_search_dirblock(struct inode *, void *, int *, const char *, int,
+ int *, doff_t *, doff_t *, doff_t *, struct ext2fs_searchslot *);
+
/* Flags to low-level allocation routines.
* The low 16-bits are reserved for IO_ flags from vnode.h.
OpenPOWER on IntegriCloud