]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: reduce the amount of space needed for truncates
authorJosef Bacik <josef@redhat.com>
Fri, 19 Aug 2011 14:29:59 +0000 (10:29 -0400)
committerJosef Bacik <josef@redhat.com>
Wed, 19 Oct 2011 19:12:37 +0000 (15:12 -0400)
commit18af83d373ab972e8f7979a1344321904ad3834c
treec527bfd0444cd9a589278873dd78ef185f66d2fc
parent316a03ef61d9ee7046b419902a51903c1861fcaa
Btrfs: reduce the amount of space needed for truncates

With btrfs_truncate_inode_items we always return if we have to go to another
leaf, which makes us do our reservation again.  This means we will only ever
modify one leaf at a time, so we only need 1 items worth of slack space.  Also,
since we are deleting we will not be creating nodes as we go down, if anything
we'll be free'ing them as we merge them together, so make a different
calculation for truncate which will only have the worst case useage of COW'ing
the entire path down to the leaf.  Thanks,

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