]> www.infradead.org Git - users/jedix/linux-maple.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)
committerChris Mason <chris.mason@oracle.com>
Wed, 16 Nov 2011 02:20:15 +0000 (21:20 -0500)
commitd2f55b927ffd722ea0c4bfa0062848db0adf22ed
treeb906b0b39485cf773d8d1dc0f37eac6e0325ecce
parentd760a24e7c1b628f358be257ec0d441e775e47ba
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>
(cherry picked from commit 907cbcebd4e5f641faf08601f216b1ceb6cb3bdf)
fs/btrfs/inode.c