diff --git a/convert/common.h b/convert/common.h index 935916f3..581ef329 100644 --- a/convert/common.h +++ b/convert/common.h @@ -63,4 +63,25 @@ struct btrfs_convert_context { int make_convert_btrfs(int fd, struct btrfs_mkfs_config *cfg, struct btrfs_convert_context *cctx); +/* + * Represents a simple contiguous range. + * + * For multiple or non-contiguous ranges, use extent_cache_tree from + * extent-cache.c + */ +struct simple_range { + u64 start; + u64 len; +}; + +/* + * Simple range functions + */ + +/* Get range end (exclusive) */ +static inline u64 range_end(const struct simple_range *range) +{ + return (range->start + range->len); +} + #endif diff --git a/convert/source-fs.h b/convert/source-fs.h index 46dea6b9..c65b29c7 100644 --- a/convert/source-fs.h +++ b/convert/source-fs.h @@ -29,17 +29,6 @@ struct task_info; #define CONV_IMAGE_SUBVOL_OBJECTID BTRFS_FIRST_FREE_OBJECTID -/* - * Represents a simple contiguous range. - * - * For multiple or non-contiguous ranges, use extent_cache_tree from - * extent-cache.c - */ -struct simple_range { - u64 start; - u64 len; -}; - extern const struct simple_range btrfs_reserved_ranges[3]; struct task_ctx { @@ -160,14 +149,4 @@ int read_disk_extent(struct btrfs_root *root, u64 bytenr, int record_file_blocks(struct blk_iterate_data *data, u64 file_block, u64 disk_block, u64 num_blocks); -/* - * Simple range functions - * - * Get range end (exclusive) - */ -static inline u64 range_end(const struct simple_range *range) -{ - return (range->start + range->len); -} - #endif