diff --git a/btrfs-list.c b/btrfs-list.c index 3e29cf80..875a89dc 100644 --- a/btrfs-list.c +++ b/btrfs-list.c @@ -18,7 +18,6 @@ #include #include -#include "ioctl.h" #include #include #include @@ -30,6 +29,7 @@ #include "ctree.h" #include "transaction.h" #include "utils.h" +#include "ioctl.h" #include #include "btrfs-list.h" #include "rbtree-utils.h" diff --git a/btrfs-list.h b/btrfs-list.h index 4b213008..13f44c3a 100644 --- a/btrfs-list.h +++ b/btrfs-list.h @@ -21,10 +21,16 @@ #if BTRFS_FLAT_INCLUDES #include "kerncompat.h" +#include "rbtree.h" +#include "ioctl.h" #else #include +#include +#include #endif /* BTRFS_FLAT_INCLUDES */ +#include + #define BTRFS_LIST_LAYOUT_DEFAULT 0 #define BTRFS_LIST_LAYOUT_TABLE 1 #define BTRFS_LIST_LAYOUT_RAW 2 diff --git a/btrfsck.h b/btrfsck.h index e58c55ab..0882a383 100644 --- a/btrfsck.h +++ b/btrfsck.h @@ -22,10 +22,12 @@ #if BTRFS_FLAT_INCLUDES #include "kerncompat.h" +#include "ctree.h" #include "extent-cache.h" #include "list.h" #else #include +#include #include #include #endif /* BTRFS_FLAT_INCLUDES */ diff --git a/cmds-fi-usage.h b/cmds-fi-usage.h index c8061d15..adb8ad30 100644 --- a/cmds-fi-usage.h +++ b/cmds-fi-usage.h @@ -19,6 +19,9 @@ #ifndef __CMDS_FI_USAGE_H__ #define __CMDS_FI_USAGE_H__ +#include "kerncompat.h" +#include "ioctl.h" + extern const char * const cmd_filesystem_usage_usage[]; int cmd_filesystem_usage(int argc, char **argv); diff --git a/disk-io.h b/disk-io.h index 62eb566c..2d625dab 100644 --- a/disk-io.h +++ b/disk-io.h @@ -19,6 +19,9 @@ #ifndef __BTRFS_DISK_IO_H__ #define __BTRFS_DISK_IO_H__ +#include "kerncompat.h" +#include "ctree.h" + #define BTRFS_SUPER_INFO_OFFSET (64 * 1024) #define BTRFS_SUPER_INFO_SIZE 4096 diff --git a/free-space-cache.h b/free-space-cache.h index f2e71a58..85411a10 100644 --- a/free-space-cache.h +++ b/free-space-cache.h @@ -19,6 +19,10 @@ #ifndef __BTRFS_FREE_SPACE_CACHE_H__ #define __BTRFS_FREE_SPACE_CACHE_H__ +#include "kerncompat.h" +#include "ctree.h" +#include "rbtree.h" + struct btrfs_free_space { struct rb_node offset_index; u64 offset; diff --git a/ioctl.h b/ioctl.h index dfc46027..dff015a5 100644 --- a/ioctl.h +++ b/ioctl.h @@ -19,14 +19,13 @@ #ifndef __BTRFS_IOCTL_H__ #define __BTRFS_IOCTL_H__ -#include -#include -#include - #ifdef __cplusplus extern "C" { #endif +#include +#include + #ifndef __user #define __user #endif diff --git a/qgroup-verify.h b/qgroup-verify.h index 174ed455..7d91c197 100644 --- a/qgroup-verify.h +++ b/qgroup-verify.h @@ -19,6 +19,9 @@ #ifndef __BTRFS_QGROUP_VERIFY_H__ #define __BTRFS_QGROUP_VERIFY_H__ +#include "kerncompat.h" +#include "ctree.h" + int qgroup_verify_all(struct btrfs_fs_info *info); void print_qgroup_report(int all); diff --git a/qgroup.h b/qgroup.h index 22737fa8..5886fc33 100644 --- a/qgroup.h +++ b/qgroup.h @@ -19,8 +19,8 @@ #ifndef __BTRFS_QGROUP_H__ #define __BTRFS_QGROUP_H__ -#include "ioctl.h" #include "kerncompat.h" +#include "ioctl.h" struct btrfs_qgroup; diff --git a/repair.h b/repair.h index 3d04e6db..3fc0e8b6 100644 --- a/repair.h +++ b/repair.h @@ -19,6 +19,8 @@ #ifndef __BTRFS_REPAIR_H__ #define __BTRFS_REPAIR_H__ +#include "ctree.h" + struct btrfs_corrupt_block { struct cache_extent cache; struct btrfs_key key; diff --git a/send-stream.h b/send-stream.h index 133a3105..39901f86 100644 --- a/send-stream.h +++ b/send-stream.h @@ -28,6 +28,12 @@ extern "C" { #endif +#if BTRFS_FLAT_INCLUDES +#include "kerncompat.h" +#else +#include +#endif /* BTRFS_FLAT_INCLUDES */ + struct btrfs_send_ops { int (*subvol)(const char *path, const u8 *uuid, u64 ctransid, void *user); diff --git a/send-utils.h b/send-utils.h index 0f38b5ad..d28c8d51 100644 --- a/send-utils.h +++ b/send-utils.h @@ -20,9 +20,11 @@ #define __BTRFS_SEND_UTILS_H__ #if BTRFS_FLAT_INCLUDES +#include "kerncompat.h" #include "ctree.h" #include "rbtree.h" #else +#include #include #include #endif /* BTRFS_FLAT_INCLUDES */ diff --git a/transaction.h b/transaction.h index c5780bc6..13e09a64 100644 --- a/transaction.h +++ b/transaction.h @@ -19,6 +19,9 @@ #ifndef __BTRFS_TRANSACTION_H__ #define __BTRFS_TRANSACTION_H__ +#include "kerncompat.h" +#include "ctree.h" + struct btrfs_trans_handle { u64 transid; u64 alloc_exclude_start; diff --git a/volumes.h b/volumes.h index 40ed1239..99a3fa11 100644 --- a/volumes.h +++ b/volumes.h @@ -19,6 +19,9 @@ #ifndef __BTRFS_VOLUMES_H__ #define __BTRFS_VOLUMES_H__ +#include "kerncompat.h" +#include "ctree.h" + #define BTRFS_STRIPE_LEN (64 * 1024) struct btrfs_device {