Skip to content
Commit 4e06bdd6 authored by Josef Bacik's avatar Josef Bacik Committed by Chris Mason
Browse files

Btrfs: try committing transaction before returning ENOSPC



This fixes a problem where we could return -ENOSPC when we may actually have
plenty of space, the space is just pinned.  Instead of returning -ENOSPC
immediately, commit the transaction first and then try and do the allocation
again.

This patch also does chunk allocation for metadata if we pass the 80%
threshold for metadata space.  This will help with stack usage since the chunk
allocation will happen early on, instead of when the allocation is happening.

Signed-off-by: default avatarJosef Bacik <jbacik@redhat.com>
parent 6a63209f
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