]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: load free space cache if it exists
authorJosef Bacik <josef@redhat.com>
Wed, 25 Aug 2010 20:54:15 +0000 (16:54 -0400)
committerChris Mason <chris.mason@oracle.com>
Fri, 29 Oct 2010 13:26:35 +0000 (09:26 -0400)
commitfbfdd7bff5b2940f307c62acc7d3346f5ca55fa2
tree27fd70c6c07cb96a48123bdec07e9c2feed90f13
parentbf226d6a167fe21a2b05c8f90fb898b579bba3c2
Btrfs: load free space cache if it exists

This patch actually loads the free space cache if it exists.  The only thing
that really changes here is that we need to cache the block group if we're going
to remove an extent from it.  Previously we did not do this since the caching
kthread would pick it up.  With the on disk cache we don't have this luxury so
we need to make sure we read the on disk cache in first, and then remove the
extent, that way when the extent is unpinned the free space is added to the
block group.  This has been tested with all sorts of things.

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