aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tests/btrfs-tests.c
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2013-10-11 14:44:09 -0400
committerChris Mason <chris.mason@fusionio.com>2013-11-11 21:57:30 -0500
commitaaedb55bc08f384b7f57dbb3222a511baed4decf (patch)
treea82118fce66fff847e3412eae4ef7c3c3dc5c616 /fs/btrfs/tests/btrfs-tests.c
parent294e30fee35d3151d100cfe59e839c2dbc16a374 (diff)
Btrfs: add tests for btrfs_get_extent
I'm going to be removing hole extents in the near future so I wanted to make a sanity test for btrfs_get_extent to make sure I don't break anything in the meantime. This patch just puts btrfs_get_extent through its paces by giving it a completely unreasonable mapping to look at and make sure it is giving us back maps that make sense. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/tests/btrfs-tests.c')
-rw-r--r--fs/btrfs/tests/btrfs-tests.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/btrfs/tests/btrfs-tests.c b/fs/btrfs/tests/btrfs-tests.c
index 697d527377c1..757ef00a75a4 100644
--- a/fs/btrfs/tests/btrfs-tests.c
+++ b/fs/btrfs/tests/btrfs-tests.c
@@ -24,11 +24,17 @@
24 24
25static struct vfsmount *test_mnt = NULL; 25static struct vfsmount *test_mnt = NULL;
26 26
27static const struct super_operations btrfs_test_super_ops = {
28 .alloc_inode = btrfs_alloc_inode,
29 .destroy_inode = btrfs_test_destroy_inode,
30};
31
27static struct dentry *btrfs_test_mount(struct file_system_type *fs_type, 32static struct dentry *btrfs_test_mount(struct file_system_type *fs_type,
28 int flags, const char *dev_name, 33 int flags, const char *dev_name,
29 void *data) 34 void *data)
30{ 35{
31 return mount_pseudo(fs_type, "btrfs_test:", NULL, NULL, BTRFS_TEST_MAGIC); 36 return mount_pseudo(fs_type, "btrfs_test:", &btrfs_test_super_ops,
37 NULL, BTRFS_TEST_MAGIC);
32} 38}
33 39
34static struct file_system_type test_type = { 40static struct file_system_type test_type = {