diff --git a/mkfs/common.c b/mkfs/common.c index a1255bc3..0ac24e2e 100644 --- a/mkfs/common.c +++ b/mkfs/common.c @@ -14,22 +14,31 @@ * Boston, MA 021110-1307, USA. */ +#include #include #include #include +#include +#include +#include +#include +#include #include #include #include "kernel-shared/ctree.h" #include "kernel-shared/disk-io.h" #include "kernel-shared/volumes.h" #include "kernel-shared/transaction.h" +#include "kernel-shared/extent_io.h" #include "kernel-shared/zoned.h" -#include "common/utils.h" +#include "common/fsfeatures.h" +#include "common/internal.h" +#include "common/messages.h" #include "common/path-utils.h" #include "common/device-utils.h" -#include "common/device-scan.h" #include "common/open-utils.h" #include "mkfs/common.h" +#include "ioctl.h" static u64 reference_root_table[] = { [MKFS_ROOT_TREE] = BTRFS_ROOT_TREE_OBJECTID, diff --git a/mkfs/common.h b/mkfs/common.h index 47b14cda..fbacc25e 100644 --- a/mkfs/common.h +++ b/mkfs/common.h @@ -23,8 +23,14 @@ #define __BTRFS_MKFS_COMMON_H__ #include "kerncompat.h" +#include +#include "kernel-lib/sizes.h" +#include "kernel-shared/ctree.h" #include "common/defs.h" +struct btrfs_root; +struct btrfs_trans_handle; + #define BTRFS_MKFS_SYSTEM_GROUP_SIZE SZ_4M #define BTRFS_MKFS_SMALL_VOLUME_SIZE SZ_1G @@ -37,9 +43,6 @@ #define BTRFS_MKFS_DEFAULT_DATA_MULTI_DEVICE 0 /* SINGLE */ #define BTRFS_MKFS_DEFAULT_META_MULTI_DEVICE BTRFS_BLOCK_GROUP_RAID1 -struct btrfs_trans_handle; -struct btrfs_root; - /* * Tree root blocks created during mkfs */ diff --git a/mkfs/main.c b/mkfs/main.c index 1e38d1c4..6d6aaafe 100644 --- a/mkfs/main.c +++ b/mkfs/main.c @@ -17,28 +17,29 @@ */ #include "kerncompat.h" - -#include -#include -#include "ioctl.h" +#include #include #include -#include #include -#include #include #include -#include +#include +#include +#include #include -#include +#include "kernel-lib/list.h" #include "kernel-lib/list_sort.h" +#include "kernel-lib/rbtree.h" +#include "kernel-lib/sizes.h" #include "kernel-shared/ctree.h" #include "kernel-shared/disk-io.h" -#include "kernel-shared/free-space-tree.h" #include "kernel-shared/volumes.h" #include "kernel-shared/transaction.h" #include "kernel-shared/zoned.h" #include "crypto/crc32c.h" +#include "common/defs.h" +#include "common/internal.h" +#include "common/messages.h" #include "common/utils.h" #include "common/path-utils.h" #include "common/device-utils.h" diff --git a/mkfs/rootdir.c b/mkfs/rootdir.c index e6a8bef4..f4433b8f 100644 --- a/mkfs/rootdir.c +++ b/mkfs/rootdir.c @@ -19,24 +19,26 @@ #include "kerncompat.h" #include -#include #include -#include #include #include #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/volumes.h" #include "kernel-shared/disk-io.h" #include "kernel-shared/transaction.h" #include "common/internal.h" #include "common/messages.h" -#include "common/utils.h" -#include "common/send-utils.h" #include "common/path-utils.h" #include "mkfs/rootdir.h" -#include "mkfs/common.h" static u32 fs_block_size; diff --git a/mkfs/rootdir.h b/mkfs/rootdir.h index de3722d7..ad7c08b3 100644 --- a/mkfs/rootdir.h +++ b/mkfs/rootdir.h @@ -21,8 +21,14 @@ #ifndef __BTRFS_MKFS_ROOTDIR_H__ #define __BTRFS_MKFS_ROOTDIR_H__ +#include "kerncompat.h" +#include +#include #include "kernel-lib/list.h" +struct btrfs_fs_info; +struct btrfs_root; + struct directory_name_entry { const char *dir_name; char *path;