diff options
author | Josef Bacik <jbacik@fusionio.com> | 2013-09-20 00:07:01 +0400 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-11-12 06:51:02 +0400 |
commit | 06ea65a398a2501e94beee3a425d07e1846ff25a (patch) | |
tree | da8445a365ceecd4df89a9d6a3da79afaa320765 /fs/btrfs/disk-io.h | |
parent | dd3cc16b8750251ea9b1a843ce7806e82b015d5e (diff) | |
download | linux-06ea65a398a2501e94beee3a425d07e1846ff25a.tar.xz |
Btrfs: add a sanity test for btrfs_split_item
While looking at somebodys corruption I became completely convinced that
btrfs_split_item was broken, so I wrote this test to verify that it was working
as it was supposed to. Thankfully it appears to be working as intended, so just
add this test to make sure nobody breaks it in the future. Thanks,
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/disk-io.h')
-rw-r--r-- | fs/btrfs/disk-io.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.h b/fs/btrfs/disk-io.h index 5ce2a7da8b11..53059df350f8 100644 --- a/fs/btrfs/disk-io.h +++ b/fs/btrfs/disk-io.h @@ -86,6 +86,10 @@ void btrfs_drop_and_free_fs_root(struct btrfs_fs_info *fs_info, struct btrfs_root *root); void btrfs_free_fs_root(struct btrfs_root *root); +#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS +struct btrfs_root *btrfs_alloc_dummy_root(void); +#endif + /* * This function is used to grab the root, and avoid it is freed when we * access it. But it doesn't ensure that the tree is not dropped. |