History log of /fs/ocfs2/dir.h
Revision Date Author Comments
3704412bdbf37ec836152f571ac74fe72220c05a 23-May-2013 Al Viro <viro@zeniv.linux.org.uk> [readdir] convert ocfs2

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
e7c17e43090afe558c40bfb66637744c27bd2aeb 30-Jan-2009 Mark Fasheh <mfasheh@suse.com> ocfs2: Introduce dir free space list

The only operation which doesn't get faster with directory indexing is
insert, which still has to walk the entire unindexed directory portion to
find a free block. This patch provides an improvement in directory insert
performance by maintaining a singly linked list of directory leaf blocks
which have space for additional dirents.

Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Acked-by: Joel Becker <joel.becker@oracle.com>
4ed8a6bb083bfcc21f1ed66a474b03c0386e4b34 25-Nov-2008 Mark Fasheh <mfasheh@suse.com> ocfs2: Store dir index records inline

Allow us to store a small number of directory index records in the
ocfs2_dx_root_block. This saves us a disk read on small to medium sized
directories (less than about 250 entries). The inline root is automatically
turned into a root block with extents if the directory size increases beyond
it's capacity.

Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Acked-by: Joel Becker <joel.becker@oracle.com>
9b7895efac906d66d19856194e1ba61f37e231a4 13-Nov-2008 Mark Fasheh <mfasheh@suse.com> 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>
4a12ca3a00a244e1fd1e673d151ea38b71e11d55 13-Nov-2008 Mark Fasheh <mfasheh@suse.com> ocfs2: Introduce dir lookup helper struct

Many directory manipulation calls pass around a tuple of dirent, and it's
containing buffer_head. Dir indexing has a bit more state, but instead of
adding yet more arguments to functions, we introduce 'struct
ocfs2_dir_lookup_result'. In this patch, it simply holds the same tuple, but
future patches will add more state.

Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Acked-by: Joel Becker <joel.becker@oracle.com>
c175a518b4a1d514483abf61813ce5d855917164 11-Dec-2008 Joel Becker <joel.becker@oracle.com> ocfs2: Checksum and ECC for directory blocks.

Use the db_check field of ocfs2_dir_block_trailer to crc/ecc the
dirblocks.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
38760e243249f03b4c6d78ca624dd846a2681b67 12-Sep-2007 Mark Fasheh <mark.fasheh@oracle.com> ocfs2: Rename cleanups

ocfs2_rename() does direct manipulation of the dirent it's gotten back from
a directory search. Wrap this manipulation inside of a function so that we
can transparently change directory update behavior in the future. As an
added bonus, this gets rid of an ugly macro.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Reviewed-by: Joel Becker <joel.becker@oracle.com>
be94d11704ef79030fd2e6a0c41b4a7f65f9e860 12-Sep-2007 Mark Fasheh <mark.fasheh@oracle.com> ocfs2: Provide convenience function for ino lookup

A couple paths which needed to just match a parent dir + name pair to an
inode number were a bit messy because they had to deal with
ocfs2_find_files_on_disk() which returns a larger number of values. Provide
a convenience function, ocfs2_lookup_ino_from_name() which internalizes all
the extra accounting.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Reviewed-by: Joel Becker <joel.becker@oracle.com>
0bfbbf62a8b5a129ba2c689283bfece80a601aba 12-Sep-2007 Mark Fasheh <mark.fasheh@oracle.com> ocfs2: Implement ocfs2_empty_dir() as a caller of ocfs2_dir_foreach()

We can preserve the behavior of ocfs2_empty_dir(), while getting rid of the
open coded directory walk by just providing a smart filldir callback. This
also automatically gets to use the dir readahead code, though in this case
any advantage is minor at best.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Reviewed-by: Joel Becker <joel.becker@oracle.com>
5eae5b96fc86e6c85f5f90e90fe9e6966f1fec63 11-Sep-2007 Mark Fasheh <mark.fasheh@oracle.com> ocfs2: Remove open coded readdir()

ocfs2_queue_orphans() has an open coded readdir loop which can easily just
use a directory accessor function.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Reviewed-by: Joel Becker <joel.becker@oracle.com>
316f4b9f98a353ac1be93199694fd97272378815 08-Sep-2007 Mark Fasheh <mark.fasheh@oracle.com> ocfs2: Move directory manipulation code into dir.c

The code for adding, removing, deleting directory entries was splattered all
over namei.c. I'd rather have this all centralized, so that it's easier to
make changes for inline dir data, and eventually indexed directories.

None of the code in any of the functions was changed. I only removed the
static keyword from some prototypes so that they could be exported.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Reviewed-by: Joel Becker <joel.becker@oracle.com>
1fabe1481fac9e01bf8bffa60a2307ef379aa5de 10-Oct-2006 Mark Fasheh <mark.fasheh@oracle.com> ocfs2: Remove struct ocfs2_journal_handle in favor of handle_t

This is mostly a search and replace as ocfs2_journal_handle is now no more
than a container for a handle_t pointer.

ocfs2_commit_trans() becomes very straight forward, and we remove some out
of date comments / code.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
ccd979bdbce9fba8412beb3f1de68a9d0171b12c 15-Dec-2005 Mark Fasheh <mark.fasheh@oracle.com> [PATCH] OCFS2: The Second Oracle Cluster Filesystem

The OCFS2 file system module.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>