]> git.baikalelectronics.ru Git - kernel.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)
commit58f1ff5536a5bc1611dadc1525b9dc4dcbed7967
tree2f605e19e8d44360c9eb4033adda940e9e5ab007
parent937a56ed6eed50592c07a361cbc74d0a70c8eac7
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