diff options
author | Tao Ma <tao.ma@oracle.com> | 2009-02-24 11:53:23 -0500 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2009-04-03 14:39:17 -0400 |
commit | 138211515c102807a16c02fdc15feef1f6ef8124 (patch) | |
tree | 9b6fff8512a19792f2e29458292607f4efb413c4 /fs/ocfs2/suballoc.h | |
parent | 1d46dc08d33138c29c63d717807c08ab704fc773 (diff) |
ocfs2: Optimize inode allocation by remembering last group
In ocfs2, the inode block search looks for the "emptiest" inode
group to allocate from. So if an inode alloc file has many equally
(or almost equally) empty groups, new inodes will tend to get
spread out amongst them, which in turn can put them all over the
disk. This is undesirable because directory operations on conceptually
"nearby" inodes force a large number of seeks.
So we add ip_last_used_group in core directory inodes which records
the last used allocation group. Another field named ip_last_used_slot
is also added in case inode stealing happens. When claiming new inode,
we passed in directory's inode so that the allocation can use this
information.
For more details, please see
http://oss.oracle.com/osswiki/OCFS2/DesignDocs/InodeAllocationStrategy.
Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/suballoc.h')
-rw-r--r-- | fs/ocfs2/suballoc.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ocfs2/suballoc.h b/fs/ocfs2/suballoc.h index e3c13c77f9e8..ea85a4c8b4b1 100644 --- a/fs/ocfs2/suballoc.h +++ b/fs/ocfs2/suballoc.h | |||
@@ -88,6 +88,8 @@ int ocfs2_claim_metadata(struct ocfs2_super *osb, | |||
88 | u64 *blkno_start); | 88 | u64 *blkno_start); |
89 | int ocfs2_claim_new_inode(struct ocfs2_super *osb, | 89 | int ocfs2_claim_new_inode(struct ocfs2_super *osb, |
90 | handle_t *handle, | 90 | handle_t *handle, |
91 | struct inode *dir, | ||
92 | struct buffer_head *parent_fe_bh, | ||
91 | struct ocfs2_alloc_context *ac, | 93 | struct ocfs2_alloc_context *ac, |
92 | u16 *suballoc_bit, | 94 | u16 *suballoc_bit, |
93 | u64 *fe_blkno); | 95 | u64 *fe_blkno); |