]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
Btrfs: optimize how we account for space in truncate
authorJosef Bacik <josef@redhat.com>
Mon, 8 Aug 2011 17:46:15 +0000 (13:46 -0400)
committerJosef Bacik <josef@redhat.com>
Wed, 19 Oct 2011 19:12:35 +0000 (15:12 -0400)
commit907cbcebd4e5f641faf08601f216b1ceb6cb3bdf
tree2f605e19e8d44360c9eb4033adda940e9e5ab007
parent13553e5221d6901a33b3f2157a389de085c161fe
Btrfs: optimize how we account for space in truncate

Currently we're starting and stopping a transaction for no real reason, so kill
that and just reserve enough space as if we can truncate all in one transaction.
Also use btrfs_block_rsv_check() for our reserve to minimize the amount of space
we may have to allocate for our slack space.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
fs/btrfs/inode.c