Btrfs: async delalloc flushing under space pressure
authorJosef Bacik <josef@redhat.com>
Thu, 8 Oct 2009 00:44:34 +0000 (20:44 -0400)
committerChris Mason <chris.mason@oracle.com>
Thu, 8 Oct 2009 19:21:23 +0000 (15:21 -0400)
commite3ccfa989752c083ceb23c823a84f7ce3a081e61
tree197558cbee7b773b8270cd861f882a37beacd2ed
parent32c00aff718bb54a214b39146bdd9ac01511cd25
Btrfs: async delalloc flushing under space pressure

This patch moves the delalloc flushing that occurs when we are under space
pressure off to a async thread pool.  This helps since we only free up
metadata space when we actually insert the extent item, which means it takes
quite a while for space to be free'ed up if we wait on all ordered extents.
However, if space is freed up due to inline extents being inserted, we can
wake people who are waiting up early, and they can finish their work.

Signed-off-by: Josef Bacik <jbacik@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c