diff --git a/Makefile b/Makefile index 7f7b1194..cd571513 100644 --- a/Makefile +++ b/Makefile @@ -82,7 +82,6 @@ CFLAGS = $(SUBST_CFLAGS) \ -fno-strict-aliasing \ -fPIC \ -I$(TOPDIR) \ - -I$(TOPDIR)/kernel-lib \ -I$(TOPDIR)/libbtrfsutil \ $(DISABLE_WARNING_FLAGS) \ $(EXTRAWARN_CFLAGS) \ diff --git a/btrfs-corrupt-block.c b/btrfs-corrupt-block.c index 760198eb..bbef0c02 100644 --- a/btrfs-corrupt-block.c +++ b/btrfs-corrupt-block.c @@ -29,7 +29,7 @@ #include "disk-io.h" #include "print-tree.h" #include "transaction.h" -#include "list.h" +#include "kernel-lib/list.h" #include "common/utils.h" #include "common/help.h" diff --git a/btrfs-crc.c b/btrfs-crc.c index 635dd492..bcf25df8 100644 --- a/btrfs-crc.c +++ b/btrfs-crc.c @@ -19,7 +19,7 @@ #include #include #include -#include "crc32c.h" +#include "kernel-lib/crc32c.h" #include "common/utils.h" void print_usage(int status) diff --git a/btrfs-find-root.c b/btrfs-find-root.c index 96d9837e..e46fa872 100644 --- a/btrfs-find-root.c +++ b/btrfs-find-root.c @@ -29,10 +29,10 @@ #include "disk-io.h" #include "print-tree.h" #include "transaction.h" -#include "list.h" +#include "kernel-lib/list.h" #include "volumes.h" #include "common/utils.h" -#include "crc32c.h" +#include "kernel-lib/crc32c.h" #include "extent-cache.h" #include "find-root.h" #include "common/help.h" diff --git a/btrfs-list.h b/btrfs-list.h index 3c0954e5..ea06e663 100644 --- a/btrfs-list.h +++ b/btrfs-list.h @@ -21,7 +21,7 @@ #if BTRFS_FLAT_INCLUDES #include "kerncompat.h" -#include "rbtree.h" +#include "kernel-lib/rbtree.h" #include "ioctl.h" #else #include diff --git a/btrfs-map-logical.c b/btrfs-map-logical.c index 308f3d0a..97ba0d2f 100644 --- a/btrfs-map-logical.c +++ b/btrfs-map-logical.c @@ -27,7 +27,7 @@ #include "disk-io.h" #include "print-tree.h" #include "transaction.h" -#include "list.h" +#include "kernel-lib/list.h" #include "common/utils.h" #include "common/help.h" diff --git a/btrfs-sb-mod.c b/btrfs-sb-mod.c index c381fb60..4961819e 100644 --- a/btrfs-sb-mod.c +++ b/btrfs-sb-mod.c @@ -24,7 +24,7 @@ #include #include #include -#include +#include "kernel-lib/crc32c.h" #include "disk-io.h" #define BLOCKSIZE (4096) diff --git a/btrfs-select-super.c b/btrfs-select-super.c index 5d953a26..42b13f21 100644 --- a/btrfs-select-super.c +++ b/btrfs-select-super.c @@ -27,7 +27,7 @@ #include "disk-io.h" #include "print-tree.h" #include "transaction.h" -#include "list.h" +#include "kernel-lib/list.h" #include "common/utils.h" #include "common/help.h" diff --git a/btrfs.c b/btrfs.c index d9d9059a..96b585af 100644 --- a/btrfs.c +++ b/btrfs.c @@ -20,7 +20,7 @@ #include #include "volumes.h" -#include "crc32c.h" +#include "kernel-lib/crc32c.h" #include "cmds/commands.h" #include "common/utils.h" #include "common/help.h" diff --git a/btrfsck.h b/btrfsck.h index 020593c9..ac7f5d48 100644 --- a/btrfsck.h +++ b/btrfsck.h @@ -24,7 +24,7 @@ #include "kerncompat.h" #include "ctree.h" #include "extent-cache.h" -#include "list.h" +#include "kernel-lib/list.h" #else #include #include diff --git a/cmds/filesystem-du.c b/cmds/filesystem-du.c index acb7ee73..4b2a2e60 100644 --- a/cmds/filesystem-du.c +++ b/cmds/filesystem-du.c @@ -37,9 +37,9 @@ #include "common/utils.h" #include "cmds/commands.h" #include "kerncompat.h" -#include "rbtree.h" +#include "kernel-lib/rbtree.h" -#include "interval_tree_generic.h" +#include "kernel-lib/interval_tree_generic.h" #include "common/help.h" #include "common/fsfeatures.h" diff --git a/cmds/filesystem.c b/cmds/filesystem.c index 751c647c..7e419095 100644 --- a/cmds/filesystem.c +++ b/cmds/filesystem.c @@ -37,7 +37,7 @@ #include "volumes.h" #include "cmds/commands.h" #include "cmds/filesystem-usage.h" -#include "list_sort.h" +#include "kernel-lib/list_sort.h" #include "disk-io.h" #include "common/help.h" #include "common/fsfeatures.h" diff --git a/cmds/inspect-dump-super.c b/cmds/inspect-dump-super.c index 15c5c10f..6707e689 100644 --- a/cmds/inspect-dump-super.c +++ b/cmds/inspect-dump-super.c @@ -29,10 +29,10 @@ #include "disk-io.h" #include "print-tree.h" #include "transaction.h" -#include "list.h" +#include "kernel-lib/list.h" #include "common/utils.h" #include "cmds/commands.h" -#include "crc32c.h" +#include "kernel-lib/crc32c.h" #include "common/help.h" static int check_csum_sblock(void *sb, int csum_size) diff --git a/cmds/inspect-dump-tree.c b/cmds/inspect-dump-tree.c index bbbfeb76..6b202a54 100644 --- a/cmds/inspect-dump-tree.c +++ b/cmds/inspect-dump-tree.c @@ -23,7 +23,7 @@ #include #include "kerncompat.h" -#include "radix-tree.h" +#include "kernel-lib/radix-tree.h" #include "ctree.h" #include "disk-io.h" #include "print-tree.h" diff --git a/cmds/inspect-tree-stats.c b/cmds/inspect-tree-stats.c index 51e18cbe..34d9e695 100644 --- a/cmds/inspect-tree-stats.c +++ b/cmds/inspect-tree-stats.c @@ -31,7 +31,7 @@ #include "disk-io.h" #include "print-tree.h" #include "transaction.h" -#include "list.h" +#include "kernel-lib/list.h" #include "volumes.h" #include "common/utils.h" #include "cmds/commands.h" diff --git a/cmds/receive.c b/cmds/receive.c index 97ce61e8..b30710a8 100644 --- a/cmds/receive.c +++ b/cmds/receive.c @@ -43,7 +43,7 @@ #include "ioctl.h" #include "cmds/commands.h" #include "common/utils.h" -#include "list.h" +#include "kernel-lib/list.h" #include "btrfs-list.h" #include "send.h" diff --git a/cmds/rescue-chunk-recover.c b/cmds/rescue-chunk-recover.c index 1bc159b1..608af9d4 100644 --- a/cmds/rescue-chunk-recover.c +++ b/cmds/rescue-chunk-recover.c @@ -29,14 +29,14 @@ #include #include -#include "list.h" -#include "radix-tree.h" +#include "kernel-lib/list.h" +#include "kernel-lib/radix-tree.h" #include "ctree.h" #include "extent-cache.h" #include "disk-io.h" #include "volumes.h" #include "transaction.h" -#include "crc32c.h" +#include "kernel-lib/crc32c.h" #include "common/utils.h" #include "btrfsck.h" #include "cmds/commands.h" diff --git a/cmds/rescue-super-recover.c b/cmds/rescue-super-recover.c index cc9c756c..ea3a00ca 100644 --- a/cmds/rescue-super-recover.c +++ b/cmds/rescue-super-recover.c @@ -29,9 +29,9 @@ #include "kerncompat.h" #include "ctree.h" #include "disk-io.h" -#include "list.h" +#include "kernel-lib/list.h" #include "common/utils.h" -#include "crc32c.h" +#include "kernel-lib/crc32c.h" #include "volumes.h" #include "cmds/commands.h" #include "cmds/rescue.h" diff --git a/cmds/restore.c b/cmds/restore.c index 6cc6d439..2b517b15 100644 --- a/cmds/restore.c +++ b/cmds/restore.c @@ -41,7 +41,7 @@ #include "disk-io.h" #include "print-tree.h" #include "transaction.h" -#include "list.h" +#include "kernel-lib/list.h" #include "volumes.h" #include "common/utils.h" #include "cmds/commands.h" diff --git a/cmds/send.c b/cmds/send.c index 39ea6148..585b23db 100644 --- a/cmds/send.c +++ b/cmds/send.c @@ -38,7 +38,7 @@ #include "ctree.h" #include "ioctl.h" #include "cmds/commands.h" -#include "list.h" +#include "kernel-lib/list.h" #include "common/utils.h" #include "send.h" diff --git a/common/utils.c b/common/utils.c index 1c296740..aef2ee16 100644 --- a/common/utils.c +++ b/common/utils.c @@ -43,11 +43,11 @@ #include #include "kerncompat.h" -#include "radix-tree.h" +#include "kernel-lib/radix-tree.h" #include "ctree.h" #include "disk-io.h" #include "transaction.h" -#include "crc32c.h" +#include "kernel-lib/crc32c.h" #include "common/utils.h" #include "volumes.h" #include "ioctl.h" diff --git a/common/utils.h b/common/utils.h index c4a1b511..0ffa7222 100644 --- a/common/utils.h +++ b/common/utils.h @@ -26,7 +26,7 @@ #include "common-defs.h" #include "common/internal.h" #include "btrfs-list.h" -#include "sizes.h" +#include "kernel-lib/sizes.h" #include "common/messages.h" #include "ioctl.h" #include "common/fsfeatures.h" diff --git a/convert/source-reiserfs.c b/convert/source-reiserfs.c index 5f46b9bb..e3187f23 100644 --- a/convert/source-reiserfs.c +++ b/convert/source-reiserfs.c @@ -25,7 +25,7 @@ #include "disk-io.h" #include "transaction.h" #include "common/utils.h" -#include "bitops.h" +#include "kernel-lib/bitops.h" #include "convert/common.h" #include "convert/source-reiserfs.h" diff --git a/ctree.c b/ctree.c index 4ad4ec8a..76bc9c58 100644 --- a/ctree.c +++ b/ctree.c @@ -21,7 +21,7 @@ #include "print-tree.h" #include "repair.h" #include "common/internal.h" -#include "sizes.h" +#include "kernel-lib/sizes.h" #include "common/messages.h" #include "volumes.h" diff --git a/ctree.h b/ctree.h index eac467d7..c63fad83 100644 --- a/ctree.h +++ b/ctree.h @@ -22,13 +22,13 @@ #include #if BTRFS_FLAT_INCLUDES -#include "list.h" +#include "kernel-lib/list.h" #include "kerncompat.h" -#include "radix-tree.h" +#include "kernel-lib/radix-tree.h" #include "extent-cache.h" #include "extent_io.h" #include "ioctl.h" -#include "sizes.h" +#include "kernel-lib/sizes.h" #else #include #include diff --git a/disk-io.c b/disk-io.c index dac15124..31ce9203 100644 --- a/disk-io.c +++ b/disk-io.c @@ -24,12 +24,12 @@ #include #include #include "kerncompat.h" -#include "radix-tree.h" +#include "kernel-lib/radix-tree.h" #include "ctree.h" #include "disk-io.h" #include "volumes.h" #include "transaction.h" -#include "crc32c.h" +#include "kernel-lib/crc32c.h" #include "common/utils.h" #include "print-tree.h" #include "rbtree-utils.h" diff --git a/disk-io.h b/disk-io.h index c97aa234..7b5c3806 100644 --- a/disk-io.h +++ b/disk-io.h @@ -21,7 +21,7 @@ #include "kerncompat.h" #include "ctree.h" -#include "sizes.h" +#include "kernel-lib/sizes.h" #define BTRFS_SUPER_INFO_OFFSET SZ_64K #define BTRFS_SUPER_INFO_SIZE 4096 diff --git a/extent-cache.h b/extent-cache.h index 33d018dd..688d8f64 100644 --- a/extent-cache.h +++ b/extent-cache.h @@ -21,7 +21,7 @@ #if BTRFS_FLAT_INCLUDES #include "kerncompat.h" -#include "rbtree.h" +#include "kernel-lib/rbtree.h" #else #include #include diff --git a/extent-tree.c b/extent-tree.c index 7706d024..932af2c6 100644 --- a/extent-tree.c +++ b/extent-tree.c @@ -21,12 +21,12 @@ #include #include #include "kerncompat.h" -#include "radix-tree.h" +#include "kernel-lib/radix-tree.h" #include "ctree.h" #include "disk-io.h" #include "print-tree.h" #include "transaction.h" -#include "crc32c.h" +#include "kernel-lib/crc32c.h" #include "volumes.h" #include "free-space-cache.h" #include "free-space-tree.h" diff --git a/extent_io.c b/extent_io.c index dce1ce95..d4a68279 100644 --- a/extent_io.c +++ b/extent_io.c @@ -25,7 +25,7 @@ #include #include "kerncompat.h" #include "extent_io.h" -#include "list.h" +#include "kernel-lib/list.h" #include "ctree.h" #include "volumes.h" #include "common/utils.h" diff --git a/extent_io.h b/extent_io.h index 874cbca1..1715acc6 100644 --- a/extent_io.h +++ b/extent_io.h @@ -22,7 +22,7 @@ #if BTRFS_FLAT_INCLUDES #include "kerncompat.h" #include "extent-cache.h" -#include "list.h" +#include "kernel-lib/list.h" #else #include #include diff --git a/file-item.c b/file-item.c index 427196a9..3bf48c68 100644 --- a/file-item.c +++ b/file-item.c @@ -19,12 +19,12 @@ #include #include #include "kerncompat.h" -#include "radix-tree.h" +#include "kernel-lib/radix-tree.h" #include "ctree.h" #include "disk-io.h" #include "transaction.h" #include "print-tree.h" -#include "crc32c.h" +#include "kernel-lib/crc32c.h" #include "common/internal.h" #define MAX_CSUM_ITEMS(r, size) ((((BTRFS_LEAF_DATA_SIZE(r->fs_info) - \ diff --git a/find-root.h b/find-root.h index 60d1111d..0505fd18 100644 --- a/find-root.h +++ b/find-root.h @@ -22,7 +22,7 @@ #include "kerncompat.h" #include "ctree.h" -#include "list.h" +#include "kernel-lib/list.h" #include "extent-cache.h" /* diff --git a/free-space-cache.c b/free-space-cache.c index fec9000d..e872eb6a 100644 --- a/free-space-cache.c +++ b/free-space-cache.c @@ -22,8 +22,8 @@ #include "transaction.h" #include "disk-io.h" #include "extent_io.h" -#include "crc32c.h" -#include "bitops.h" +#include "kernel-lib/crc32c.h" +#include "kernel-lib/bitops.h" #include "common/internal.h" #include "common/utils.h" diff --git a/free-space-cache.h b/free-space-cache.h index 707fb6d3..fb552cfd 100644 --- a/free-space-cache.h +++ b/free-space-cache.h @@ -21,7 +21,7 @@ #include "kerncompat.h" #include "ctree.h" -#include "rbtree.h" +#include "kernel-lib/rbtree.h" struct btrfs_free_space { struct rb_node offset_index; diff --git a/free-space-tree.c b/free-space-tree.c index 46b03f3b..0e8690eb 100644 --- a/free-space-tree.c +++ b/free-space-tree.c @@ -22,7 +22,7 @@ #include "free-space-tree.h" #include "volumes.h" #include "transaction.h" -#include "bitops.h" +#include "kernel-lib/bitops.h" #include "common/internal.h" static struct btrfs_free_space_info * diff --git a/hash.h b/hash.h index 9ff67613..5398e886 100644 --- a/hash.h +++ b/hash.h @@ -19,7 +19,7 @@ #ifndef __BTRFS_HASH_H__ #define __BTRFS_HASH_H__ -#include "crc32c.h" +#include "kernel-lib/crc32c.h" static inline u64 btrfs_name_hash(const char *name, int len) { diff --git a/image/main.c b/image/main.c index 081f9466..cabae619 100644 --- a/image/main.c +++ b/image/main.c @@ -28,7 +28,7 @@ #include #include "kerncompat.h" -#include "crc32c.h" +#include "kernel-lib/crc32c.h" #include "ctree.h" #include "disk-io.h" #include "transaction.h" diff --git a/kernel-lib/crc32c.c b/kernel-lib/crc32c.c index 29fd01d4..36bb6f18 100644 --- a/kernel-lib/crc32c.c +++ b/kernel-lib/crc32c.c @@ -8,7 +8,7 @@ * */ #include "kerncompat.h" -#include "crc32c.h" +#include "kernel-lib/crc32c.h" #include #include #include diff --git a/kernel-lib/interval_tree_generic.h b/kernel-lib/interval_tree_generic.h index e26c7322..b294f19a 100644 --- a/kernel-lib/interval_tree_generic.h +++ b/kernel-lib/interval_tree_generic.h @@ -20,8 +20,7 @@ */ #include - -#include "rbtree_augmented.h" +#include "kernel-lib/rbtree_augmented.h" /* * Template for implementing interval trees diff --git a/kernel-lib/list_sort.c b/kernel-lib/list_sort.c index 9e2c2024..dd82ea7c 100644 --- a/kernel-lib/list_sort.c +++ b/kernel-lib/list_sort.c @@ -4,8 +4,8 @@ */ #include "kerncompat.h" -#include "list_sort.h" -#include "list.h" +#include "kernel-lib/list_sort.h" +#include "kernel-lib/list.h" #define MAX_LIST_LENGTH_BITS 20 diff --git a/kernel-lib/radix-tree.c b/kernel-lib/radix-tree.c index f259ab56..4649f871 100644 --- a/kernel-lib/radix-tree.c +++ b/kernel-lib/radix-tree.c @@ -37,7 +37,7 @@ */ #include "kerncompat.h" -#include "radix-tree.h" +#include "kernel-lib/radix-tree.h" #ifdef __KERNEL__ #define RADIX_TREE_MAP_SHIFT (CONFIG_BASE_SMALL ? 4 : 6) #else diff --git a/kernel-lib/rbtree.c b/kernel-lib/rbtree.c index 92590a57..30d6cf67 100644 --- a/kernel-lib/rbtree.c +++ b/kernel-lib/rbtree.c @@ -21,7 +21,7 @@ linux/lib/rbtree.c */ -#include "rbtree_augmented.h" +#include "kernel-lib/rbtree_augmented.h" /* * red-black trees properties: http://en.wikipedia.org/wiki/Rbtree diff --git a/kernel-lib/rbtree_augmented.h b/kernel-lib/rbtree_augmented.h index 5d269784..091d3bfe 100644 --- a/kernel-lib/rbtree_augmented.h +++ b/kernel-lib/rbtree_augmented.h @@ -24,7 +24,7 @@ #ifndef _LINUX_RBTREE_AUGMENTED_H #define _LINUX_RBTREE_AUGMENTED_H -#include "rbtree.h" +#include "kernel-lib/rbtree.h" #ifdef __cplusplus extern "C" { diff --git a/kernel-shared/ulist.h b/kernel-shared/ulist.h index 1ada7de2..5db1b798 100644 --- a/kernel-shared/ulist.h +++ b/kernel-shared/ulist.h @@ -9,8 +9,8 @@ #define __ULIST_H__ #include "kerncompat.h" -#include "list.h" -#include "rbtree.h" +#include "kernel-lib/list.h" +#include "kernel-lib/rbtree.h" /* * ulist is a generic data structure to hold a collection of unique u64 diff --git a/library-test.c b/library-test.c index 2be238d0..f7d0cdc7 100644 --- a/library-test.c +++ b/library-test.c @@ -19,11 +19,11 @@ #if BTRFS_FLAT_INCLUDES #include "kerncompat.h" #include "version.h" -#include "rbtree.h" -#include "radix-tree.h" -#include "crc32c.h" -#include "list.h" -#include "sizes.h" +#include "kernel-lib/rbtree.h" +#include "kernel-lib/radix-tree.h" +#include "kernel-lib/crc32c.h" +#include "kernel-lib/list.h" +#include "kernel-lib/sizes.h" #include "ctree.h" #include "extent_io.h" #include "ioctl.h" diff --git a/mkfs/main.c b/mkfs/main.c index 0a1e26c5..f4feb4ee 100644 --- a/mkfs/main.c +++ b/mkfs/main.c @@ -37,7 +37,7 @@ #include "volumes.h" #include "transaction.h" #include "common/utils.h" -#include "list_sort.h" +#include "kernel-lib/list_sort.h" #include "common/help.h" #include "rbtree-utils.h" #include "mkfs/common.h" diff --git a/print-tree.c b/print-tree.c index e3af1920..b31e515f 100644 --- a/print-tree.c +++ b/print-tree.c @@ -20,7 +20,7 @@ #include #include #include "kerncompat.h" -#include "radix-tree.h" +#include "kernel-lib/radix-tree.h" #include "ctree.h" #include "disk-io.h" #include "print-tree.h" diff --git a/qgroup-verify.c b/qgroup-verify.c index 0dc8e636..6e1e7b8b 100644 --- a/qgroup-verify.c +++ b/qgroup-verify.c @@ -22,7 +22,7 @@ #include #include #include "kerncompat.h" -#include "radix-tree.h" +#include "kernel-lib/radix-tree.h" #include "ctree.h" #include "disk-io.h" #include "print-tree.h" diff --git a/quick-test.c b/quick-test.c index 1712adc4..6b228deb 100644 --- a/quick-test.c +++ b/quick-test.c @@ -20,7 +20,7 @@ #include #include #include "kerncompat.h" -#include "radix-tree.h" +#include "kernel-lib/radix-tree.h" #include "ctree.h" #include "disk-io.h" #include "print-tree.h" diff --git a/random-test.c b/random-test.c index d5f830a9..e3b50b50 100644 --- a/random-test.c +++ b/random-test.c @@ -20,7 +20,7 @@ #include #include #include "kerncompat.h" -#include "radix-tree.h" +#include "kernel-lib/radix-tree.h" #include "ctree.h" #include "disk-io.h" #include "print-tree.h" diff --git a/rbtree-utils.h b/rbtree-utils.h index 718581ff..767d4ef4 100644 --- a/rbtree-utils.h +++ b/rbtree-utils.h @@ -19,7 +19,7 @@ #ifndef __RBTREE_UTILS__ #define __RBTREE_UTILS__ -#include "rbtree.h" +#include "kernel-lib/rbtree.h" #ifdef __cplusplus extern "C" { diff --git a/send-stream.c b/send-stream.c index 34c64c1f..08687e5e 100644 --- a/send-stream.c +++ b/send-stream.c @@ -21,7 +21,7 @@ #include "send.h" #include "send-stream.h" -#include "crc32c.h" +#include "kernel-lib/crc32c.h" #include "common/utils.h" struct btrfs_send_stream { diff --git a/send-utils.h b/send-utils.h index 5f5e096f..811a1761 100644 --- a/send-utils.h +++ b/send-utils.h @@ -22,7 +22,7 @@ #if BTRFS_FLAT_INCLUDES #include "kerncompat.h" #include "ctree.h" -#include "rbtree.h" +#include "kernel-lib/rbtree.h" #else #include #include