#include <linux/types.h>
#include "btrfs-tests.h"
#include "../ctree.h"
#include "../disk-io.h"
#include "../free-space-tree.h"
#include "../transaction.h"
#include "../block-group.h"
#include "../accessors.h"
struct free_space_extent { … };
static int __check_free_space_extents(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info,
struct btrfs_block_group *cache,
struct btrfs_path *path,
const struct free_space_extent * const extents,
unsigned int num_extents)
{ … }
static int check_free_space_extents(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info,
struct btrfs_block_group *cache,
struct btrfs_path *path,
const struct free_space_extent * const extents,
unsigned int num_extents)
{ … }
static int test_empty_block_group(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info,
struct btrfs_block_group *cache,
struct btrfs_path *path,
u32 alignment)
{ … }
static int test_remove_all(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info,
struct btrfs_block_group *cache,
struct btrfs_path *path,
u32 alignment)
{ … }
static int test_remove_beginning(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info,
struct btrfs_block_group *cache,
struct btrfs_path *path,
u32 alignment)
{ … }
static int test_remove_end(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info,
struct btrfs_block_group *cache,
struct btrfs_path *path,
u32 alignment)
{ … }
static int test_remove_middle(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info,
struct btrfs_block_group *cache,
struct btrfs_path *path,
u32 alignment)
{ … }
static int test_merge_left(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info,
struct btrfs_block_group *cache,
struct btrfs_path *path,
u32 alignment)
{ … }
static int test_merge_right(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info,
struct btrfs_block_group *cache,
struct btrfs_path *path,
u32 alignment)
{ … }
static int test_merge_both(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info,
struct btrfs_block_group *cache,
struct btrfs_path *path,
u32 alignment)
{ … }
static int test_merge_none(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info,
struct btrfs_block_group *cache,
struct btrfs_path *path,
u32 alignment)
{ … }
test_func_t;
static int run_test(test_func_t test_func, int bitmaps, u32 sectorsize,
u32 nodesize, u32 alignment)
{ … }
static int run_test_both_formats(test_func_t test_func, u32 sectorsize,
u32 nodesize, u32 alignment)
{ … }
int btrfs_test_free_space_tree(u32 sectorsize, u32 nodesize)
{ … }