summaryrefslogtreecommitdiff
path: root/fs/ocfs2/ocfs2_fs.h
diff options
context:
space:
mode:
authorMark Fasheh <mfasheh@suse.com>2009-01-29 18:17:46 -0800
committerMark Fasheh <mfasheh@suse.com>2009-04-03 11:39:16 -0700
commite7c17e43090afe558c40bfb66637744c27bd2aeb (patch)
tree4c164c4ec59eaa7599c91f865a261517454ba45f /fs/ocfs2/ocfs2_fs.h
parent4ed8a6bb083bfcc21f1ed66a474b03c0386e4b34 (diff)
downloadlinux-stable-e7c17e43090afe558c40bfb66637744c27bd2aeb.tar.gz
linux-stable-e7c17e43090afe558c40bfb66637744c27bd2aeb.tar.bz2
linux-stable-e7c17e43090afe558c40bfb66637744c27bd2aeb.zip
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>
Diffstat (limited to 'fs/ocfs2/ocfs2_fs.h')
-rw-r--r--fs/ocfs2/ocfs2_fs.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/ocfs2/ocfs2_fs.h b/fs/ocfs2/ocfs2_fs.h
index 1d1c54ea5bc4..d549b1799a61 100644
--- a/fs/ocfs2/ocfs2_fs.h
+++ b/fs/ocfs2/ocfs2_fs.h
@@ -416,6 +416,7 @@ static struct ocfs2_system_inode_info ocfs2_system_inodes[NUM_SYSTEM_INODES] = {
#define OCFS2_DIR_REC_LEN(name_len) (((name_len) + OCFS2_DIR_MEMBER_LEN + \
OCFS2_DIR_ROUND) & \
~OCFS2_DIR_ROUND)
+#define OCFS2_DIR_MIN_REC_LEN OCFS2_DIR_REC_LEN(1)
#define OCFS2_LINK_MAX 32000
@@ -842,7 +843,9 @@ struct ocfs2_dx_root_block {
__le16 dr_reserved1;
__le64 dr_dir_blkno; /* Pointer to parent inode */
__le64 dr_reserved2;
- __le64 dr_reserved3[16];
+ __le64 dr_free_blk; /* Pointer to head of free
+ * unindexed block list. */
+ __le64 dr_reserved3[15];
union {
struct ocfs2_extent_list dr_list; /* Keep this aligned to 128
* bits for maximum space