diff options
author | Josef Bacik <jbacik@fusionio.com> | 2013-10-09 12:00:56 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-11-11 21:56:51 -0500 |
commit | 294e30fee35d3151d100cfe59e839c2dbc16a374 (patch) | |
tree | 3906ec3d135ec29dc7700f8e35e494909b210848 /fs/btrfs/tests/btrfs-tests.h | |
parent | 857cc2fc29cfaf4ee98fe9967bbf6a3942191136 (diff) |
Btrfs: add tests for find_lock_delalloc_range
So both Liu and I made huge messes of find_lock_delalloc_range trying to fix
stuff, me first by fixing extent size, then him by fixing something I broke and
then me again telling him to fix it a different way. So this is obviously a
candidate for some testing. This patch adds a pseudo fs so we can allocate fake
inodes for tests that need an inode or pages. Then it addes a bunch of tests to
make sure find_lock_delalloc_range is acting the way it is supposed to. With
this patch and all of our previous patches to find_lock_delalloc_range I am sure
it is working as expected now. 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.h')
-rw-r--r-- | fs/btrfs/tests/btrfs-tests.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/btrfs/tests/btrfs-tests.h b/fs/btrfs/tests/btrfs-tests.h index 04f2cd2ca568..e935fe5291e7 100644 --- a/fs/btrfs/tests/btrfs-tests.h +++ b/fs/btrfs/tests/btrfs-tests.h | |||
@@ -25,6 +25,10 @@ | |||
25 | 25 | ||
26 | int btrfs_test_free_space_cache(void); | 26 | int btrfs_test_free_space_cache(void); |
27 | int btrfs_test_extent_buffer_operations(void); | 27 | int btrfs_test_extent_buffer_operations(void); |
28 | int btrfs_test_extent_io(void); | ||
29 | int btrfs_init_test_fs(void); | ||
30 | void btrfs_destroy_test_fs(void); | ||
31 | struct inode *btrfs_new_test_inode(void); | ||
28 | #else | 32 | #else |
29 | static inline int btrfs_test_free_space_cache(void) | 33 | static inline int btrfs_test_free_space_cache(void) |
30 | { | 34 | { |
@@ -34,6 +38,17 @@ static inline int btrfs_test_extent_buffer_operations(void) | |||
34 | { | 38 | { |
35 | return 0; | 39 | return 0; |
36 | } | 40 | } |
41 | static inline int btrfs_init_test_fs(void) | ||
42 | { | ||
43 | return 0; | ||
44 | } | ||
45 | static inline void btrfs_destroy_test_fs(void) | ||
46 | { | ||
47 | } | ||
48 | static inline int btrfs_test_extent_io(void) | ||
49 | { | ||
50 | return 0; | ||
51 | } | ||
37 | #endif | 52 | #endif |
38 | 53 | ||
39 | #endif | 54 | #endif |