aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/alloc.h
diff options
context:
space:
mode:
authorTao Ma <tao.ma@oracle.com>2008-08-18 05:38:52 -0400
committerMark Fasheh <mfasheh@suse.com>2008-10-13 19:57:03 -0400
commitca12b7c48942d21b2e7890b820db9d578bc291cd (patch)
treee051e6ceb77a05db7dd1d749d7f3f1682c69196c /fs/ocfs2/alloc.h
parent589dc2602f2a1b7fa5e59b90f548af189f128d77 (diff)
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 <tao.ma@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/alloc.h')
-rw-r--r--fs/ocfs2/alloc.h5
1 files changed, 5 insertions, 0 deletions
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 {
32 OCFS2_XATTR_TREE_EXTENT, 32 OCFS2_XATTR_TREE_EXTENT,
33}; 33};
34 34
35/*
36 * For xattr tree leaf, we limit the leaf byte size to be 64K.
37 */
38#define OCFS2_MAX_XATTR_TREE_LEAF_SIZE 65536
39
35struct ocfs2_alloc_context; 40struct ocfs2_alloc_context;
36int ocfs2_dinode_insert_extent(struct ocfs2_super *osb, 41int ocfs2_dinode_insert_extent(struct ocfs2_super *osb,
37 handle_t *handle, 42 handle_t *handle,