From 4ed8a6bb083bfcc21f1ed66a474b03c0386e4b34 Mon Sep 17 00:00:00 2001 From: Mark Fasheh Date: Mon, 24 Nov 2008 17:02:08 -0800 Subject: 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 Acked-by: Joel Becker --- fs/ocfs2/namei.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'fs/ocfs2/namei.c') diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index 0c5507193200..f911edc8378b 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c @@ -321,10 +321,8 @@ static int ocfs2_mknod(struct inode *dir, want_clusters += 1; /* Dir indexing requires extra space as well */ - if (ocfs2_supports_indexed_dirs(osb)) { - want_clusters++; + if (ocfs2_supports_indexed_dirs(osb)) want_meta++; - } } status = ocfs2_reserve_new_metadata_blocks(osb, want_meta, &meta_ac); -- cgit v1.2.3