]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Btrfs: use bytes_may_use for all ENOSPC reservations
authorJosef Bacik <josef@redhat.com>
Tue, 26 Jul 2011 21:00:46 +0000 (17:00 -0400)
committerChris Mason <chris.mason@oracle.com>
Wed, 16 Nov 2011 02:20:11 +0000 (21:20 -0500)
commit489259c54b0de651c09e58295d8b2032c0fb6274
tree532504d6c73b632dcbe6eb4641438730d506c681
parent41884747ebfd9d7bddac8f849ebace2fab7d5066
Btrfs: use bytes_may_use for all ENOSPC reservations

We have been using bytes_reserved for metadata reservations, which is wrong
since we use that to keep track of outstanding reservations from the allocator.
This resulted in us doing a lot of silly things to make sure we don't allocate a
bunch of metadata chunks since we never had a real view of how much space was
actually in use by metadata.

This passes Arne's enospc test and xfstests as well as my own enospc tests.
Hopefully this will get us moving in the right direction.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
(cherry picked from commit fb25e9141ab843794d5cdef3936ccb58435e2371)
fs/btrfs/ctree.h
fs/btrfs/extent-tree.c
fs/btrfs/free-space-cache.c