From 288f8cb78f2b5fbda94052fb7ff5f6a6d9fe7603 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Thu, 15 Sep 2022 13:10:53 +0200 Subject: [PATCH] btrfs-progs: update include list in standalone tools The tool IWYU (include what you use) suggests to remove and add some includes. Signed-off-by: David Sterba --- btrfs-corrupt-block.c | 11 ++++++----- btrfs-find-root.c | 11 +++-------- btrfs-map-logical.c | 9 ++++++--- btrfs-select-super.c | 9 +++------ btrfs.c | 3 +++ btrfstune.c | 11 ++++++++--- 6 files changed, 29 insertions(+), 25 deletions(-) diff --git a/btrfs-corrupt-block.c b/btrfs-corrupt-block.c index 8fb9fb06..93bd709a 100644 --- a/btrfs-corrupt-block.c +++ b/btrfs-corrupt-block.c @@ -19,19 +19,20 @@ #include "kerncompat.h" #include #include -#include -#include #include #include +#include +#include +#include "kernel-lib/radix-tree.h" #include "kernel-shared/ctree.h" #include "kernel-shared/volumes.h" #include "kernel-shared/disk-io.h" -#include "kernel-shared/print-tree.h" #include "kernel-shared/transaction.h" -#include "kernel-lib/list.h" -#include "kernel-lib/radix-tree.h" +#include "kernel-shared/extent_io.h" #include "common/utils.h" #include "common/help.h" +#include "common/extent-cache.h" +#include "common/messages.h" #define FIELD_BUF_LEN 80 diff --git a/btrfs-find-root.c b/btrfs-find-root.c index c0ad4a40..cab1a52f 100644 --- a/btrfs-find-root.c +++ b/btrfs-find-root.c @@ -17,23 +17,18 @@ */ #include "kerncompat.h" -#include #include #include -#include -#include #include -#include -#include "kernel-lib/list.h" +#include #include "kernel-shared/ctree.h" #include "kernel-shared/disk-io.h" -#include "kernel-shared/print-tree.h" -#include "kernel-shared/transaction.h" #include "kernel-shared/volumes.h" -#include "crypto/crc32c.h" +#include "kernel-shared/extent_io.h" #include "common/utils.h" #include "common/extent-cache.h" #include "common/help.h" +#include "common/messages.h" #include "cmds/commands.h" /* diff --git a/btrfs-map-logical.c b/btrfs-map-logical.c index 8ac7f34d..06b34672 100644 --- a/btrfs-map-logical.c +++ b/btrfs-map-logical.c @@ -22,15 +22,18 @@ #include #include #include -#include "kernel-lib/list.h" +#include +#include +#include "kernel-lib/sizes.h" #include "kernel-lib/radix-tree.h" #include "kernel-shared/ctree.h" +#include "kernel-shared/extent_io.h" #include "kernel-shared/volumes.h" #include "kernel-shared/disk-io.h" -#include "kernel-shared/print-tree.h" -#include "kernel-shared/transaction.h" +#include "common/internal.h" #include "common/utils.h" #include "common/help.h" +#include "common/extent-cache.h" #define BUFFER_SIZE SZ_64K diff --git a/btrfs-select-super.c b/btrfs-select-super.c index 42e5866b..ef8d4bd9 100644 --- a/btrfs-select-super.c +++ b/btrfs-select-super.c @@ -17,21 +17,18 @@ */ #include "kerncompat.h" -#include #include #include -#include -#include -#include "kernel-lib/list.h" +#include +#include #include "kernel-lib/radix-tree.h" #include "kernel-shared/ctree.h" #include "kernel-shared/volumes.h" #include "kernel-shared/disk-io.h" -#include "kernel-shared/print-tree.h" -#include "kernel-shared/transaction.h" #include "common/utils.h" #include "common/help.h" #include "common/open-utils.h" +#include "common/messages.h" static void print_usage(void) { diff --git a/btrfs.c b/btrfs.c index f8fc0cee..049ecdf0 100644 --- a/btrfs.c +++ b/btrfs.c @@ -14,10 +14,13 @@ * Boston, MA 021110-1307, USA. */ +#include "kerncompat.h" #include #include #include #include +#include +#include #include "kernel-shared/volumes.h" #include "crypto/crc32c.h" #include "common/utils.h" diff --git a/btrfstune.c b/btrfstune.c index 89eaa458..c36a95a8 100644 --- a/btrfstune.c +++ b/btrfstune.c @@ -17,25 +17,30 @@ */ #include "kerncompat.h" -#include -#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/transaction.h" #include "kernel-shared/volumes.h" +#include "kernel-shared/extent_io.h" +#include "common/defs.h" #include "common/utils.h" +#include "common/extent-cache.h" #include "common/open-utils.h" #include "common/parse-utils.h" #include "common/device-scan.h" +#include "common/messages.h" #include "common/help.h" #include "common/box.h" +#include "ioctl.h" static char *device; static int force = 0;