diff options
author | Omar Sandoval <osandov@fb.com> | 2015-09-29 20:50:36 -0700 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-12-17 12:16:47 -0800 |
commit | 7c55ee0c4afba4434d973117234577ae6ff77a1c (patch) | |
tree | 70866c20b2f0b6d8a3fa598218a5b8f73d320fd5 /fs/btrfs/tests/btrfs-tests.h | |
parent | a5ed91828518ab076209266c2bc510adabd078df (diff) | |
download | op-kernel-dev-7c55ee0c4afba4434d973117234577ae6ff77a1c.zip op-kernel-dev-7c55ee0c4afba4434d973117234577ae6ff77a1c.tar.gz |
Btrfs: add free space tree sanity tests
This tests the operations on the free space tree trying to excercise all
of the main cases for both formats. Between this and xfstests, the free
space tree should have pretty good coverage.
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/tests/btrfs-tests.h')
-rw-r--r-- | fs/btrfs/tests/btrfs-tests.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/btrfs/tests/btrfs-tests.h b/fs/btrfs/tests/btrfs-tests.h index fd39542..054b8c7 100644 --- a/fs/btrfs/tests/btrfs-tests.h +++ b/fs/btrfs/tests/btrfs-tests.h @@ -24,17 +24,23 @@ #define test_msg(fmt, ...) pr_info("BTRFS: selftest: " fmt, ##__VA_ARGS__) struct btrfs_root; +struct btrfs_trans_handle; int btrfs_test_free_space_cache(void); int btrfs_test_extent_buffer_operations(void); int btrfs_test_extent_io(void); int btrfs_test_inodes(void); int btrfs_test_qgroups(void); +int btrfs_test_free_space_tree(void); int btrfs_init_test_fs(void); void btrfs_destroy_test_fs(void); struct inode *btrfs_new_test_inode(void); struct btrfs_fs_info *btrfs_alloc_dummy_fs_info(void); void btrfs_free_dummy_root(struct btrfs_root *root); +struct btrfs_block_group_cache * +btrfs_alloc_dummy_block_group(unsigned long length); +void btrfs_free_dummy_block_group(struct btrfs_block_group_cache *cache); +void btrfs_init_dummy_trans(struct btrfs_trans_handle *trans); #else static inline int btrfs_test_free_space_cache(void) { @@ -63,6 +69,10 @@ static inline int btrfs_test_qgroups(void) { return 0; } +static inline int btrfs_test_free_space_tree(void) +{ + return 0; +} #endif #endif |