summaryrefslogtreecommitdiff
path: root/fs/btrfs/raid-stripe-tree.h
diff options
context:
space:
mode:
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>2024-10-02 12:11:48 +0200
committerDavid Sterba <dsterba@suse.com>2024-11-11 14:34:14 +0100
commit506be4d5657569e7683cad9de17f980d264a60ec (patch)
tree1042ad11963b41c4871f6af518be578e3da50621 /fs/btrfs/raid-stripe-tree.h
parent2144e1f23f986977acf0ff695a93931517c374d8 (diff)
btrfs: tests: add selftests for raid-stripe-tree
Add first stash of very basic self tests for the RAID stripe-tree. More test cases will follow exercising the tree. Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/raid-stripe-tree.h')
-rw-r--r--fs/btrfs/raid-stripe-tree.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/raid-stripe-tree.h b/fs/btrfs/raid-stripe-tree.h
index 1ac1c21aac2f..541836421778 100644
--- a/fs/btrfs/raid-stripe-tree.h
+++ b/fs/btrfs/raid-stripe-tree.h
@@ -28,6 +28,11 @@ int btrfs_get_raid_extent_offset(struct btrfs_fs_info *fs_info,
int btrfs_insert_raid_extent(struct btrfs_trans_handle *trans,
struct btrfs_ordered_extent *ordered_extent);
+#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
+int btrfs_insert_one_raid_extent(struct btrfs_trans_handle *trans,
+ struct btrfs_io_context *bioc);
+#endif
+
static inline bool btrfs_need_stripe_tree_update(struct btrfs_fs_info *fs_info,
u64 map_type)
{