]> 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)
commit89f992829a692145bb6e5fb630c4677ab0953dcd
tree73450e1666520ffc9d6405c51885d3c42d7d963c
parent5512ae728f0c5ee116a6dc689e6b8080a857178c
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