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>
此提交包含在:
@@ -2417,6 +2417,8 @@ out_add:
|
||||
status = ocfs2_do_insert_extent(inode, handle, fe_bh, &rec, &insert);
|
||||
if (status < 0)
|
||||
mlog_errno(status);
|
||||
else
|
||||
ocfs2_extent_map_insert_rec(inode, &rec);
|
||||
|
||||
bail:
|
||||
if (bh)
|
||||
@@ -3640,6 +3642,9 @@ int ocfs2_commit_truncate(struct ocfs2_super *osb,
|
||||
mlog_errno(status);
|
||||
goto bail;
|
||||
}
|
||||
|
||||
ocfs2_extent_map_trunc(inode, new_highest_cpos);
|
||||
|
||||
start:
|
||||
/*
|
||||
* Check that we still have allocation to delete.
|
||||
|
新增問題並參考
封鎖使用者