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/extent_io.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/extent_io.h')
-rw-r--r-- | fs/btrfs/extent_io.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h index 6dbc645f1f3d..f98602eac808 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h | |||
@@ -345,4 +345,10 @@ int repair_io_failure(struct btrfs_fs_info *fs_info, u64 start, | |||
345 | int end_extent_writepage(struct page *page, int err, u64 start, u64 end); | 345 | int end_extent_writepage(struct page *page, int err, u64 start, u64 end); |
346 | int repair_eb_io_failure(struct btrfs_root *root, struct extent_buffer *eb, | 346 | int repair_eb_io_failure(struct btrfs_root *root, struct extent_buffer *eb, |
347 | int mirror_num); | 347 | int mirror_num); |
348 | #ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS | ||
349 | noinline u64 find_lock_delalloc_range(struct inode *inode, | ||
350 | struct extent_io_tree *tree, | ||
351 | struct page *locked_page, u64 *start, | ||
352 | u64 *end, u64 max_bytes); | ||
353 | #endif | ||
348 | #endif | 354 | #endif |