.. | .. |
---|
10 | 10 | int btrfs_run_sanity_tests(void); |
---|
11 | 11 | |
---|
12 | 12 | #define test_msg(fmt, ...) pr_info("BTRFS: selftest: " fmt "\n", ##__VA_ARGS__) |
---|
13 | | -#define test_err(fmt, ...) pr_err("BTRFS: selftest: " fmt "\n", ##__VA_ARGS__) |
---|
| 13 | +#define test_err(fmt, ...) pr_err("BTRFS: selftest: %s:%d " fmt "\n", \ |
---|
| 14 | + __FILE__, __LINE__, ##__VA_ARGS__) |
---|
| 15 | + |
---|
| 16 | +#define test_std_err(index) test_err("%s", test_error[index]) |
---|
| 17 | + |
---|
| 18 | +enum { |
---|
| 19 | + TEST_ALLOC_FS_INFO, |
---|
| 20 | + TEST_ALLOC_ROOT, |
---|
| 21 | + TEST_ALLOC_EXTENT_BUFFER, |
---|
| 22 | + TEST_ALLOC_PATH, |
---|
| 23 | + TEST_ALLOC_INODE, |
---|
| 24 | + TEST_ALLOC_BLOCK_GROUP, |
---|
| 25 | + TEST_ALLOC_EXTENT_MAP, |
---|
| 26 | +}; |
---|
| 27 | + |
---|
| 28 | +extern const char *test_error[]; |
---|
14 | 29 | |
---|
15 | 30 | struct btrfs_root; |
---|
16 | 31 | struct btrfs_trans_handle; |
---|
.. | .. |
---|
26 | 41 | struct btrfs_fs_info *btrfs_alloc_dummy_fs_info(u32 nodesize, u32 sectorsize); |
---|
27 | 42 | void btrfs_free_dummy_fs_info(struct btrfs_fs_info *fs_info); |
---|
28 | 43 | void btrfs_free_dummy_root(struct btrfs_root *root); |
---|
29 | | -struct btrfs_block_group_cache * |
---|
| 44 | +struct btrfs_block_group * |
---|
30 | 45 | btrfs_alloc_dummy_block_group(struct btrfs_fs_info *fs_info, unsigned long length); |
---|
31 | | -void btrfs_free_dummy_block_group(struct btrfs_block_group_cache *cache); |
---|
| 46 | +void btrfs_free_dummy_block_group(struct btrfs_block_group *cache); |
---|
32 | 47 | void btrfs_init_dummy_trans(struct btrfs_trans_handle *trans, |
---|
33 | 48 | struct btrfs_fs_info *fs_info); |
---|
| 49 | +struct btrfs_device *btrfs_alloc_dummy_device(struct btrfs_fs_info *fs_info); |
---|
34 | 50 | #else |
---|
35 | 51 | static inline int btrfs_run_sanity_tests(void) |
---|
36 | 52 | { |
---|