diff --git a/convert/common.c b/convert/common.c index 0fb7b6c5..c5c25e52 100644 --- a/convert/common.c +++ b/convert/common.c @@ -14,14 +14,22 @@ * Boston, MA 021110-1307, USA. */ +#include #include +#include +#include +#include #include +#include "kernel-lib/sizes.h" +#include "kernel-shared/ctree.h" +#include "kernel-shared/extent_io.h" #include "kernel-shared/disk-io.h" #include "kernel-shared/volumes.h" -#include "common/utils.h" #include "common/path-utils.h" +#include "common/messages.h" #include "mkfs/common.h" #include "convert/common.h" +#include "ioctl.h" #define BTRFS_CONVERT_META_GROUP_SIZE SZ_32M diff --git a/convert/common.h b/convert/common.h index 183c282c..935916f3 100644 --- a/convert/common.h +++ b/convert/common.h @@ -23,13 +23,12 @@ #define __BTRFS_CONVERT_COMMON_H__ #include "kerncompat.h" -#include "common/defs.h" #include "common/extent-cache.h" -#define SOURCE_FS_UUID_SIZE (16) - struct btrfs_mkfs_config; +#define SOURCE_FS_UUID_SIZE (16) + struct btrfs_convert_context { u32 blocksize; u64 first_data_block; diff --git a/convert/main.c b/convert/main.c index 1c753bb2..c86bf8f7 100644 --- a/convert/main.c +++ b/convert/main.c @@ -81,7 +81,7 @@ */ #include "kerncompat.h" -#include +#include #include #include #include @@ -89,13 +89,21 @@ #include #include #include +#include +#include +#include #include +#include "kernel-lib/sizes.h" +#include "kernel-shared/extent_io.h" #include "kernel-shared/ctree.h" #include "kernel-shared/disk-io.h" #include "kernel-shared/volumes.h" #include "kernel-shared/transaction.h" #include "crypto/crc32c.h" -#include "common/utils.h" +#include "common/defs.h" +#include "common/extent-cache.h" +#include "common/internal.h" +#include "common/messages.h" #include "common/task-utils.h" #include "common/path-utils.h" #include "common/help.h" diff --git a/convert/source-ext2.c b/convert/source-ext2.c index 610db16b..2a6932a1 100644 --- a/convert/source-ext2.c +++ b/convert/source-ext2.c @@ -17,12 +17,20 @@ #if BTRFSCONVERT_EXT2 #include "kerncompat.h" +#include #include +#include #include -#include "kernel-shared/disk-io.h" +#include +#include +#include +#include +#include "kernel-lib/sizes.h" #include "kernel-shared/transaction.h" -#include "common/utils.h" +#include "common/extent-cache.h" +#include "common/messages.h" #include "convert/common.h" +#include "convert/source-fs.h" #include "convert/source-ext2.h" /* diff --git a/convert/source-ext2.h b/convert/source-ext2.h index b92de718..d204aac5 100644 --- a/convert/source-ext2.h +++ b/convert/source-ext2.h @@ -22,9 +22,12 @@ #include "kerncompat.h" #include #include -#include #include "convert/source-fs.h" +struct btrfs_inode_item; +struct btrfs_root; +struct btrfs_trans_handle; + #define INO_OFFSET (BTRFS_FIRST_FREE_OBJECTID - EXT2_ROOT_INO) /* diff --git a/convert/source-fs.c b/convert/source-fs.c index 357822d0..1b5dc7a6 100644 --- a/convert/source-fs.c +++ b/convert/source-fs.c @@ -15,10 +15,14 @@ */ #include "kerncompat.h" +#include +#include #include +#include "kernel-lib/sizes.h" #include "kernel-shared/disk-io.h" #include "kernel-shared/volumes.h" #include "common/internal.h" +#include "common/extent-cache.h" #include "convert/common.h" #include "convert/source-fs.h" diff --git a/convert/source-fs.h b/convert/source-fs.h index bb6f0589..46dea6b9 100644 --- a/convert/source-fs.h +++ b/convert/source-fs.h @@ -21,6 +21,12 @@ #include #include +struct btrfs_convert_context; +struct btrfs_inode_item; +struct btrfs_root; +struct btrfs_trans_handle; +struct task_info; + #define CONV_IMAGE_SUBVOL_OBJECTID BTRFS_FIRST_FREE_OBJECTID /* @@ -36,8 +42,6 @@ struct simple_range { extern const struct simple_range btrfs_reserved_ranges[3]; -struct task_info; - struct task_ctx { pthread_mutex_t mutex; u64 max_copy_inodes; @@ -45,8 +49,6 @@ struct task_ctx { struct task_info *info; }; -struct btrfs_convert_context; - #define SOURCE_FS_NAME_LEN (16) #define CONVERT_FLAG_DATACSUM (1U << 0) @@ -123,10 +125,6 @@ struct btrfs_convert_operations { int (*check_state)(struct btrfs_convert_context *cctx); }; -struct btrfs_trans_handle; -struct btrfs_root; -struct btrfs_inode_item; - struct blk_iterate_data { struct btrfs_trans_handle *trans; struct btrfs_root *root; diff --git a/convert/source-reiserfs.c b/convert/source-reiserfs.c index ffaaa0b5..a7e00b1e 100644 --- a/convert/source-reiserfs.c +++ b/convert/source-reiserfs.c @@ -17,14 +17,23 @@ #if BTRFSCONVERT_REISERFS #include "kerncompat.h" -#include #include +#include #include +#include +#include +#include +#include +#include #include +#include #include "kernel-lib/bitops.h" #include "kernel-shared/disk-io.h" #include "kernel-shared/transaction.h" -#include "common/utils.h" +#include "kernel-shared/extent_io.h" +#include "common/extent-cache.h" +#include "common/internal.h" +#include "common/messages.h" #include "convert/common.h" #include "convert/source-reiserfs.h" diff --git a/convert/source-reiserfs.h b/convert/source-reiserfs.h index a4e14392..794f4621 100644 --- a/convert/source-reiserfs.h +++ b/convert/source-reiserfs.h @@ -20,12 +20,18 @@ #if BTRFSCONVERT_REISERFS #include "kerncompat.h" +#include +#include #include #include #include #include #include "convert/source-fs.h" +struct btrfs_inode_item; +struct btrfs_root; +struct btrfs_trans_handle; + #define REISERFS_ACL_VERSION 0x0001 #define OID_OFFSET (BTRFS_FIRST_FREE_OBJECTID - REISERFS_ROOT_OBJECTID)