]> git.baikalelectronics.ru Git - kernel.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)
committerJosef Bacik <josef@redhat.com>
Wed, 19 Oct 2011 19:12:30 +0000 (15:12 -0400)
commit79686f865b02da74ac1ee3beefba01c9191e1e52
tree73450e1666520ffc9d6405c51885d3c42d7d963c
parentaaacf7928e98dfaa07115f4271088c7173027283
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>
fs/btrfs/ctree.h
fs/btrfs/extent-tree.c
fs/btrfs/free-space-cache.c