From ca12b7c48942d21b2e7890b820db9d578bc291cd Mon Sep 17 00:00:00 2001 From: Tao Ma Date: Mon, 18 Aug 2008 17:38:52 +0800 Subject: ocfs2: Optionally limit extent size in ocfs2_insert_extent() In xattr bucket, we want to limit the maximum size of a btree leaf, otherwise we'll lose the benefits of hashing because we'll have to search large leaves. So add a new field in ocfs2_extent_tree which indicates the maximum leaf cluster size we want so that we can prevent ocfs2_insert_extent() from merging the leaf record even if it is contiguous with an adjacent record. Other btree types are not affected by this change. Signed-off-by: Tao Ma Signed-off-by: Mark Fasheh --- fs/ocfs2/alloc.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'fs/ocfs2/alloc.h') diff --git a/fs/ocfs2/alloc.h b/fs/ocfs2/alloc.h index cd4e12d2b6b9..23c695ddaa52 100644 --- a/fs/ocfs2/alloc.h +++ b/fs/ocfs2/alloc.h @@ -32,6 +32,11 @@ enum ocfs2_extent_tree_type { OCFS2_XATTR_TREE_EXTENT, }; +/* + * For xattr tree leaf, we limit the leaf byte size to be 64K. + */ +#define OCFS2_MAX_XATTR_TREE_LEAF_SIZE 65536 + struct ocfs2_alloc_context; int ocfs2_dinode_insert_extent(struct ocfs2_super *osb, handle_t *handle, -- cgit v1.2.3