Btrfs: add hole punching

This patch adds hole punching via fallocate.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
This commit is contained in:
Josef Bacik
2012-08-29 14:27:18 -04:00
committed by Chris Mason
parent 2671485d39
commit 2aaa665581
5 changed files with 355 additions and 13 deletions

View File

@ -4132,6 +4132,8 @@ struct btrfs_block_rsv *btrfs_alloc_block_rsv(struct btrfs_root *root)
void btrfs_free_block_rsv(struct btrfs_root *root,
struct btrfs_block_rsv *rsv)
{
if (!rsv)
return;
btrfs_block_rsv_release(root, rsv, (u64)-1);
kfree(rsv);
}