diff options
author | Josef Bacik <josef@redhat.com> | 2010-08-25 16:54:15 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2010-10-29 09:26:35 -0400 |
commit | 9d66e233c7042da27ec699453770f41e567a0442 (patch) | |
tree | 27fd70c6c07cb96a48123bdec07e9c2feed90f13 /fs/btrfs/free-space-cache.h | |
parent | 0cb59c9953171e9adf6da8142a5c85ceb77bb60d (diff) |
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>
Diffstat (limited to 'fs/btrfs/free-space-cache.h')
-rw-r--r-- | fs/btrfs/free-space-cache.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/free-space-cache.h b/fs/btrfs/free-space-cache.h index 189f740bd3c0..e49ca5c321b5 100644 --- a/fs/btrfs/free-space-cache.h +++ b/fs/btrfs/free-space-cache.h | |||
@@ -39,6 +39,8 @@ int btrfs_truncate_free_space_cache(struct btrfs_root *root, | |||
39 | struct btrfs_trans_handle *trans, | 39 | struct btrfs_trans_handle *trans, |
40 | struct btrfs_path *path, | 40 | struct btrfs_path *path, |
41 | struct inode *inode); | 41 | struct inode *inode); |
42 | int load_free_space_cache(struct btrfs_fs_info *fs_info, | ||
43 | struct btrfs_block_group_cache *block_group); | ||
42 | int btrfs_write_out_cache(struct btrfs_root *root, | 44 | int btrfs_write_out_cache(struct btrfs_root *root, |
43 | struct btrfs_trans_handle *trans, | 45 | struct btrfs_trans_handle *trans, |
44 | struct btrfs_block_group_cache *block_group, | 46 | struct btrfs_block_group_cache *block_group, |