• Andrew Morton's avatar
    [PATCH] truncate speedup · 2f83855c
    Andrew Morton authored
    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.
    2f83855c
attr.c 4.55 KB