]> bbs.cooldavid.org Git - net-next-2.6.git/commit
Btrfs: write out free space cache
authorJosef Bacik <josef@redhat.com>
Fri, 2 Jul 2010 16:14:14 +0000 (12:14 -0400)
committerChris Mason <chris.mason@oracle.com>
Fri, 29 Oct 2010 13:26:29 +0000 (09:26 -0400)
commit0cb59c9953171e9adf6da8142a5c85ceb77bb60d
treef72af47fa18815491814290a1b4907082bd9316d
parent0af3d00bad38d3bb9912a60928ad0669f17bdb76
Btrfs: write out free space cache

This is a simple bit, just dump the free space cache out to our preallocated
inode when we're writing out dirty block groups.  There are a bunch of changes
in inode.c in order to account for special cases.  Mostly when we're doing the
writeout we're holding trans_mutex, so we need to use the nolock transacation
functions.  Also we can't do asynchronous completions since the async thread
could be blocked on already completed IO waiting for the transaction lock.  This
has been tested with xfstests and btrfs filesystem balance, as well as my ENOSPC
tests.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c
fs/btrfs/free-space-cache.c
fs/btrfs/free-space-cache.h
fs/btrfs/inode.c