• Miao Xie's avatar
    Btrfs: punch hole past the end of the file · 7426cc04
    Miao Xie authored
    Since we can pre-allocate the space past EOF, we should be able to reclaim
    that space if we need. This patch implements it by removing the EOF check.
    
    Though the manual of fallocate command says we can use truncate command to
    reclaim the pre-allocated space which past EOF, but because truncate command
    changes the file size, we must run several commands to reclaim the space if we
    don't want to change the file size, so it is not a good choice.
    Signed-off-by: default avatarMiao Xie <miaox@cn.fujitsu.com>
    Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
    7426cc04
file.c 60.6 KB