btrfs-progs: mkfs: update include lists

The tool IWYU (include what you use) suggests to remove and add some
includes.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2022-09-15 13:59:39 +02:00
parent ec55de0ac5
commit 0f03da53cc
5 changed files with 40 additions and 19 deletions

View File

@ -14,22 +14,31 @@
* Boston, MA 021110-1307, USA.
*/
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <limits.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <uuid/uuid.h>
#include <blkid/blkid.h>
#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,

View File

@ -23,8 +23,14 @@
#define __BTRFS_MKFS_COMMON_H__
#include "kerncompat.h"
#include <stdbool.h>
#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
*/

View File

@ -17,28 +17,29 @@
*/
#include "kerncompat.h"
#include <sys/ioctl.h>
#include <sys/mount.h>
#include "ioctl.h"
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <dirent.h>
#include <fcntl.h>
#include <limits.h>
#include <unistd.h>
#include <getopt.h>
#include <ctype.h>
#include <errno.h>
#include <stdbool.h>
#include <string.h>
#include <uuid/uuid.h>
#include <blkid/blkid.h>
#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"

View File

@ -19,24 +19,26 @@
#include "kerncompat.h"
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/xattr.h>
#include <linux/limits.h>
#include <dirent.h>
#include <unistd.h>
#include <fcntl.h>
#include <ftw.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#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;

View File

@ -21,8 +21,14 @@
#ifndef __BTRFS_MKFS_ROOTDIR_H__
#define __BTRFS_MKFS_ROOTDIR_H__
#include "kerncompat.h"
#include <sys/types.h>
#include <stdbool.h>
#include "kernel-lib/list.h"
struct btrfs_fs_info;
struct btrfs_root;
struct directory_name_entry {
const char *dir_name;
char *path;