diff options
author | Josef Bacik <josef@redhat.com> | 2011-07-26 17:00:46 -0400 |
---|---|---|
committer | Josef Bacik <josef@redhat.com> | 2011-10-19 15:12:30 -0400 |
commit | fb25e9141ab843794d5cdef3936ccb58435e2371 (patch) | |
tree | 73450e1666520ffc9d6405c51885d3c42d7d963c /fs/btrfs/ctree.h | |
parent | 830c4adbd04a79f806d4fa579546f36a71b727c1 (diff) |
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>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 03912c5c6f49..332cbdc86ad4 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -2196,8 +2196,6 @@ int btrfs_free_extent(struct btrfs_trans_handle *trans, | |||
2196 | u64 root_objectid, u64 owner, u64 offset); | 2196 | u64 root_objectid, u64 owner, u64 offset); |
2197 | 2197 | ||
2198 | int btrfs_free_reserved_extent(struct btrfs_root *root, u64 start, u64 len); | 2198 | int btrfs_free_reserved_extent(struct btrfs_root *root, u64 start, u64 len); |
2199 | int btrfs_update_reserved_bytes(struct btrfs_block_group_cache *cache, | ||
2200 | u64 num_bytes, int reserve, int sinfo); | ||
2201 | int btrfs_prepare_extent_commit(struct btrfs_trans_handle *trans, | 2199 | int btrfs_prepare_extent_commit(struct btrfs_trans_handle *trans, |
2202 | struct btrfs_root *root); | 2200 | struct btrfs_root *root); |
2203 | int btrfs_finish_extent_commit(struct btrfs_trans_handle *trans, | 2201 | int btrfs_finish_extent_commit(struct btrfs_trans_handle *trans, |