[PATCH] truncate speedup
This patch optimises the truncate of a zero-length file, which is a sufficiently common case to justify the extra test-n-branch. It does this by skipping the entire call into the fs if i_size is not being altered. The AIM9 `open_clo' test just loops, creating and unlinking a file. This patch speeds it up 50% for ext2, 600% for reiserfs.
Showing
Please register or sign in to comment