diff options
author | Mark Fasheh <mfasheh@suse.com> | 2008-11-12 19:27:44 -0500 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2009-04-03 14:39:15 -0400 |
commit | 9b7895efac906d66d19856194e1ba61f37e231a4 (patch) | |
tree | 1ee6d2630cf3617251638170dcaceef41ddda8ec /fs/ocfs2/alloc.h | |
parent | 4a12ca3a00a244e1fd1e673d151ea38b71e11d55 (diff) |
ocfs2: Add a name indexed b-tree to directory inodes
This patch makes use of Ocfs2's flexible btree code to add an additional
tree to directory inodes. The new tree stores an array of small,
fixed-length records in each leaf block. Each record stores a hash value,
and pointer to a block in the traditional (unindexed) directory tree where a
dirent with the given name hash resides. Lookup exclusively uses this tree
to find dirents, thus providing us with constant time name lookups.
Some of the hashing code was copied from ext3. Unfortunately, it has lots of
unfixed checkpatch errors. I left that as-is so that tracking changes would
be easier.
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Acked-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/alloc.h')
-rw-r--r-- | fs/ocfs2/alloc.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ocfs2/alloc.h b/fs/ocfs2/alloc.h index cceff5c37f47..353254ba29e1 100644 --- a/fs/ocfs2/alloc.h +++ b/fs/ocfs2/alloc.h | |||
@@ -75,6 +75,9 @@ struct ocfs2_xattr_value_buf; | |||
75 | void ocfs2_init_xattr_value_extent_tree(struct ocfs2_extent_tree *et, | 75 | void ocfs2_init_xattr_value_extent_tree(struct ocfs2_extent_tree *et, |
76 | struct inode *inode, | 76 | struct inode *inode, |
77 | struct ocfs2_xattr_value_buf *vb); | 77 | struct ocfs2_xattr_value_buf *vb); |
78 | void ocfs2_init_dx_root_extent_tree(struct ocfs2_extent_tree *et, | ||
79 | struct inode *inode, | ||
80 | struct buffer_head *bh); | ||
78 | 81 | ||
79 | /* | 82 | /* |
80 | * Read an extent block into *bh. If *bh is NULL, a bh will be | 83 | * Read an extent block into *bh. If *bh is NULL, a bh will be |