ocfs2: Add a name indexed b-tree to directory inodes
authorMark Fasheh <mfasheh@suse.com>
Thu, 13 Nov 2008 00:27:44 +0000 (16:27 -0800)
committerMark Fasheh <mfasheh@suse.com>
Fri, 3 Apr 2009 18:39:15 +0000 (11:39 -0700)
commit9b7895efac906d66d19856194e1ba61f37e231a4
tree1ee6d2630cf3617251638170dcaceef41ddda8ec
parent4a12ca3a00a244e1fd1e673d151ea38b71e11d55
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>
13 files changed:
fs/ocfs2/alloc.c
fs/ocfs2/alloc.h
fs/ocfs2/dir.c
fs/ocfs2/dir.h
fs/ocfs2/inode.c
fs/ocfs2/journal.c
fs/ocfs2/journal.h
fs/ocfs2/namei.c
fs/ocfs2/ocfs2.h
fs/ocfs2/ocfs2_fs.h
fs/ocfs2/super.c
fs/ocfs2/xattr.c
fs/ocfs2/xattr.h