summaryrefslogtreecommitdiff
path: root/fs/btrfs/disk-io.h
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2013-09-19 20:07:01 (GMT)
committerChris Mason <chris.mason@fusionio.com>2013-11-12 02:51:02 (GMT)
commit06ea65a398a2501e94beee3a425d07e1846ff25a (patch)
treeda8445a365ceecd4df89a9d6a3da79afaa320765 /fs/btrfs/disk-io.h
parentdd3cc16b8750251ea9b1a843ce7806e82b015d5e (diff)
downloadlinux-fsl-qoriq-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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.h b/fs/btrfs/disk-io.h
index 5ce2a7d..53059df 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.