diff options
author | Omar Sandoval <osandov@fb.com> | 2015-09-29 20:51:45 -0700 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-01-12 15:02:54 +0100 |
commit | e4797df6a9fac329fdb168f8fd6bf1925ead3c28 (patch) | |
tree | b654c6f772fa2506638c8a3d3dae0a5bbe32d6a1 /free-space-cache.c | |
parent | d8c537e71f3dce8a8d03dddfcbcac71ef2e2cdc4 (diff) |
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 <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'free-space-cache.c')
-rw-r--r-- | free-space-cache.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |