From e4797df6a9fac329fdb168f8fd6bf1925ead3c28 Mon Sep 17 00:00:00 2001 From: Omar Sandoval Date: Tue, 29 Sep 2015 20:51:45 -0700 Subject: btrfs-progs: check the free space tree in btrfsck This reuses the existing code for checking the free space cache, we just need to load the free space tree. While we do that, we check a couple of invariants on the free space tree itself. This requires pulling in some code from the kernel to exclude the super stripes. Signed-off-by: Omar Sandoval Signed-off-by: David Sterba --- free-space-cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'free-space-cache.c') diff --git a/free-space-cache.c b/free-space-cache.c index 19ab0c90..d10a5f51 100644 --- a/free-space-cache.c +++ b/free-space-cache.c @@ -802,8 +802,8 @@ void btrfs_remove_free_space_cache(struct btrfs_block_group_cache *block_group) __btrfs_remove_free_space_cache(block_group->free_space_ctl); } -static int btrfs_add_free_space(struct btrfs_free_space_ctl *ctl, u64 offset, - u64 bytes) +int btrfs_add_free_space(struct btrfs_free_space_ctl *ctl, u64 offset, + u64 bytes) { struct btrfs_free_space *info; int ret = 0; -- cgit v1.2.3