diff options
author | Mark Fasheh <mark.fasheh@oracle.com> | 2007-04-23 21:53:12 -0400 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2007-04-26 18:10:40 -0400 |
commit | 83418978827324918a8cd25ce5227312de1d4468 (patch) | |
tree | f7baefb1fc8721d6d8d1f1f937bc55535b13e18f /fs/ocfs2/alloc.c | |
parent | 7cdfc3a1c3971c9125c317cb8c2525745851798e (diff) |
ocfs2: Cache extent records
The extent map code was ripped out earlier because of an inability to deal
with holes. This patch adds back a simpler caching scheme requiring far less
code.
Our old extent map caching was designed back when meta data block caching in
Ocfs2 didn't work very well, resulting in many disk reads. These days our
metadata caching is much better, resulting in no un-necessary disk reads. As
a result, extent caching doesn't have to be as fancy, nor does it have to
cache as many extents. Keeping the last 3 extents seen should be sufficient
to give us a small performance boost on some streaming workloads.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/alloc.c')
-rw-r--r-- | fs/ocfs2/alloc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index 412a2888a3ed..a0c8667caa72 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c | |||
@@ -2417,6 +2417,8 @@ out_add: | |||
2417 | status = ocfs2_do_insert_extent(inode, handle, fe_bh, &rec, &insert); | 2417 | status = ocfs2_do_insert_extent(inode, handle, fe_bh, &rec, &insert); |
2418 | if (status < 0) | 2418 | if (status < 0) |
2419 | mlog_errno(status); | 2419 | mlog_errno(status); |
2420 | else | ||
2421 | ocfs2_extent_map_insert_rec(inode, &rec); | ||
2420 | 2422 | ||
2421 | bail: | 2423 | bail: |
2422 | if (bh) | 2424 | if (bh) |
@@ -3640,6 +3642,9 @@ int ocfs2_commit_truncate(struct ocfs2_super *osb, | |||
3640 | mlog_errno(status); | 3642 | mlog_errno(status); |
3641 | goto bail; | 3643 | goto bail; |
3642 | } | 3644 | } |
3645 | |||
3646 | ocfs2_extent_map_trunc(inode, new_highest_cpos); | ||
3647 | |||
3643 | start: | 3648 | start: |
3644 | /* | 3649 | /* |
3645 | * Check that we still have allocation to delete. | 3650 | * Check that we still have allocation to delete. |