]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: try committing transaction before returning ENOSPC
authorJosef Bacik <jbacik@redhat.com>
Fri, 20 Feb 2009 15:59:53 +0000 (10:59 -0500)
committerChris Mason <chris.mason@oracle.com>
Fri, 20 Feb 2009 15:59:53 +0000 (10:59 -0500)
commitb75e1cb3ba1c4e3d7c4b5c9b61e4828b48ec76db
tree20a7b891f7f8f518eb2cd81234e0c9ab5902c6c3
parent6adba87147a9a565e009d93e4bc19209128931ad
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: Josef Bacik <jbacik@redhat.com>
fs/btrfs/extent-tree.c