Skip to content
Commit 96f1bb57 authored by Josef Bacik's avatar Josef Bacik
Browse files

Btrfs: do not overcommit if we don't have enough space for global rsv



Because of how little we allocate chunks now we can get really tight on
metadata space before we will allocate a new chunk.  This resulted in being
unable to add device extents when allocating a new metadata chunk as we did
not have enough space.  This is because we were allowed to overcommit too
much metadata without actually making sure we had enough space to make
allocations.  The idea behind overcommit is that we are allowed to say "sure
you can have that reservation" when most of the free space is occupied by
reservations, not actual allocations.  But in this case where a majority of
the total space is in use by actual allocations we can screw ourselves by
not being able to make real allocations when it matters.  So make sure we
have enough real space for our global reserve, and if not then don't allow
overcommitting.  Thanks,

Reported-and-tested-by: default avatarJim Schutt <jaschut@sandia.gov>
Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
parent 0f5d42b2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment