btrfs-progs: clean up includes, using include-what-you-use

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2023-08-28 22:12:13 +02:00
parent d4cf2a3b4c
commit 21aa6777b2
134 changed files with 591 additions and 182 deletions

View File

@ -23,6 +23,9 @@
#include <limits.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include "kernel-shared/accessors.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/volumes.h"
#include "kernel-shared/disk-io.h"

View File

@ -21,13 +21,15 @@
#include <stdlib.h>
#include <getopt.h>
#include <errno.h>
#include <unistd.h>
#include "kernel-shared/accessors.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/disk-io.h"
#include "kernel-shared/volumes.h"
#include "kernel-shared/extent_io.h"
#include "kernel-shared/tree-checker.h"
#include "common/box.h"
#include "common/utils.h"
#include "common/extent-cache.h"
#include "common/help.h"
#include "common/messages.h"

View File

@ -25,12 +25,14 @@
#include <errno.h>
#include <string.h>
#include "kernel-lib/sizes.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/uapi/btrfs_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 "common/internal.h"
#include "common/utils.h"
#include "common/messages.h"
#include "common/help.h"
#include "common/extent-cache.h"
#include "common/extent-tree-utils.h"

View File

@ -21,10 +21,10 @@
#include <stdlib.h>
#include <errno.h>
#include <getopt.h>
#include <unistd.h>
#include "kernel-shared/ctree.h"
#include "kernel-shared/volumes.h"
#include "kernel-shared/disk-io.h"
#include "common/utils.h"
#include "common/help.h"
#include "common/open-utils.h"
#include "common/messages.h"

View File

@ -15,6 +15,7 @@
*/
#include "kerncompat.h"
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -15,6 +15,13 @@
*/
#include "kerncompat.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include "kernel-lib/rbtree.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/extent-io-tree.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/disk-io.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/free-space-cache.h"
@ -24,7 +31,6 @@
#include "kernel-shared/file-item.h"
#include "common/internal.h"
#include "common/messages.h"
#include "check/common.h"
#include "check/repair.h"
#include "check/mode-common.h"
#include "check/clear-cache.h"

View File

@ -27,20 +27,22 @@
#include <stddef.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <uuid/uuid.h>
#include "kernel-lib/list.h"
#include "kernel-lib/rbtree.h"
#include "kernel-lib/rbtree_types.h"
#include "kernel-lib/bitops.h"
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/extent-io-tree.h"
#include "kernel-shared/locking.h"
#include "kernel-shared/uapi/btrfs_tree.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/print-tree.h"
#include "kernel-shared/transaction.h"
#include "kernel-shared/free-space-cache.h"
#include "kernel-shared/free-space-tree.h"
#include "kernel-shared/backref.h"
#include "kernel-shared/ulist.h"
#include "kernel-shared/file-item.h"

View File

@ -21,6 +21,8 @@
#include <string.h>
#include <time.h>
#include "kernel-lib/rbtree.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/extent-io-tree.h"
#include "kernel-shared/extent_io.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/transaction.h"

View File

@ -25,11 +25,13 @@
#include <sys/stat.h>
#include <stdbool.h>
#include "kernel-lib/list.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/ctree.h"
#include "common/messages.h"
struct btrfs_trans_handle;
struct extent_buffer;
struct task_ctx;
extern struct task_ctx g_task_ctx;

View File

@ -20,8 +20,10 @@
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include "kernel-lib/rbtree.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/extent-io-tree.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/extent_io.h"
#include "kernel-shared/ulist.h"
#include "kernel-shared/ctree.h"

View File

@ -25,6 +25,8 @@
#include "kernel-lib/list.h"
#include "kernel-lib/rbtree.h"
#include "kernel-lib/rbtree_types.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/disk-io.h"
#include "kernel-shared/ulist.h"
@ -46,7 +48,6 @@ void qgroup_set_item_count_ptr(u64 *item_count_ptr)
/*#define QGROUP_VERIFY_DEBUG*/
static unsigned long tot_extents_scanned = 0;
struct qgroup_count;
static struct qgroup_count *find_count(u64 qgroupid);
struct qgroup_info {

View File

@ -16,6 +16,7 @@
* Boston, MA 021110-1307, USA.
*/
#include "kerncompat.h"
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
@ -23,6 +24,8 @@
#include <string.h>
#include "kernel-lib/list.h"
#include "kernel-lib/rbtree.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/extent-io-tree.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/transaction.h"
#include "kernel-shared/extent_io.h"

View File

@ -20,11 +20,16 @@
#define __BTRFS_REPAIR_H__
#include "kerncompat.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/tree-checker.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "common/extent-cache.h"
struct btrfs_trans_handle;
struct btrfs_fs_info;
struct btrfs_path;
struct btrfs_root;
struct extent_io_tree;
struct extent_buffer;
/* Repair mode */
extern int opt_check_repair;

View File

@ -25,8 +25,7 @@
#include <errno.h>
#include <dirent.h>
#include <stdbool.h>
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/volumes.h"
#include "common/open-utils.h"
#include "common/utils.h"

View File

@ -25,9 +25,8 @@
#include <getopt.h>
#include <dirent.h>
#include <stdbool.h>
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/zoned.h"
#include "kernel-shared/volumes.h"
#include "common/string-table.h"
#include "common/utils.h"
#include "common/help.h"

View File

@ -28,10 +28,12 @@
#include <dirent.h>
#include <errno.h>
#include <limits.h>
#include <stdbool.h>
#include <unistd.h>
#include "kernel-lib/rbtree.h"
#include "kernel-lib/rbtree_types.h"
#include "kernel-lib/interval_tree_generic.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "common/utils.h"
#include "common/open-utils.h"
#include "common/units.h"

View File

@ -18,12 +18,12 @@
#include <sys/ioctl.h>
#include <sys/statfs.h>
#include <linux/limits.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <getopt.h>
#include <fcntl.h>
#include <dirent.h>
#include <limits.h>
@ -32,6 +32,9 @@
#include "kernel-shared/ctree.h"
#include "kernel-shared/disk-io.h"
#include "kernel-shared/volumes.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "common/defs.h"
#include "common/utils.h"
#include "common/string-table.h"
#include "common/open-utils.h"

View File

@ -20,7 +20,7 @@
#define __CMDS_FI_USAGE_H__
#include "kerncompat.h"
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/volumes.h"
struct device_info {
u64 devid;

View File

@ -36,7 +36,6 @@
#include "kernel-lib/list.h"
#include "kernel-lib/sizes.h"
#include "kernel-lib/list_sort.h"
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/compression.h"
#include "kernel-shared/volumes.h"
@ -53,7 +52,6 @@
#include "common/device-utils.h"
#include "common/open-utils.h"
#include "common/parse-utils.h"
#include "common/string-utils.h"
#include "common/filesystem-utils.h"
#include "common/format-output.h"
#include "cmds/commands.h"

View File

@ -15,12 +15,16 @@
*/
#include "kerncompat.h"
#include <sys/stat.h>
#include <linux/fs.h>
#include <stdbool.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <getopt.h>
#include <sys/stat.h>
#include "kernel-shared/accessors.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/disk-io.h"
#include "kernel-shared/print-tree.h"

View File

@ -17,26 +17,25 @@
*/
#include "kerncompat.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <getopt.h>
#include <fcntl.h>
#include <errno.h>
#include <stdbool.h>
#include <string.h>
#include <strings.h>
#include <uuid/uuid.h>
#include "kernel-shared/accessors.h"
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/disk-io.h"
#include "kernel-shared/print-tree.h"
#include "kernel-shared/volumes.h"
#include "kernel-shared/extent_io.h"
#include "kernel-shared/tree-checker.h"
#include "common/defs.h"
#include "common/extent-cache.h"
#include "common/messages.h"
#include "common/utils.h"
#include "common/help.h"
#include "common/device-scan.h"
#include "common/string-utils.h"

View File

@ -18,19 +18,20 @@
#include "kerncompat.h"
#include <sys/time.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <getopt.h>
#include <string.h>
#include <stdbool.h>
#include <unistd.h>
#include "kernel-lib/rbtree.h"
#include "kernel-lib/rbtree_types.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/disk-io.h"
#include "kernel-shared/extent_io.h"
#include "kernel-shared/file-item.h"
#include "kernel-shared/tree-checker.h"
#include "common/utils.h"
#include "common/help.h"
#include "common/messages.h"
#include "common/open-utils.h"

View File

@ -20,6 +20,7 @@
#include <sys/statfs.h>
#include <linux/fs.h>
#include <linux/magic.h>
#include <stdbool.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
@ -31,6 +32,8 @@
#include <unistd.h>
#include "kernel-lib/list.h"
#include "kernel-lib/sizes.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/disk-io.h"

View File

@ -20,17 +20,15 @@
#include <sys/xattr.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <dirent.h>
#include <errno.h>
#include <getopt.h>
#include <stdbool.h>
#include <uuid/uuid.h>
#include "libbtrfsutil/btrfsutil.h"
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "common/defs.h"
#include "common/messages.h"
#include "common/open-utils.h"

View File

@ -16,6 +16,7 @@
* Boston, MA 021110-1307, USA.
*/
#include "kerncompat.h"
#include <sys/ioctl.h>
#include <getopt.h>
#include <errno.h>
@ -25,10 +26,13 @@
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <unistd.h>
#include "libbtrfsutil/btrfsutil.h"
#include "kernel-lib/list.h"
#include "kernel-lib/rbtree.h"
#include "kernel-lib/rbtree_types.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/ctree.h"
#include "common/open-utils.h"
@ -41,6 +45,9 @@
#include "cmds/commands.h"
#include "cmds/qgroup.h"
enum btrfs_qgroup_comp_enum;
enum btrfs_qgroup_filter_enum;
#define BTRFS_QGROUP_NFILTERS_INCREASE (2 * BTRFS_QGROUP_FILTER_MAX)
#define BTRFS_QGROUP_NCOMPS_INCREASE (2 * BTRFS_QGROUP_COMP_MAX)

View File

@ -16,6 +16,7 @@
* Boston, MA 021110-1307, USA.
*/
#include "kerncompat.h"
#include <sys/ioctl.h>
#include <dirent.h>
#include <errno.h>
@ -23,6 +24,7 @@
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include <unistd.h>
#include "kernel-shared/uapi/btrfs.h"
#include "common/help.h"
#include "common/open-utils.h"

View File

@ -45,7 +45,6 @@
#include <zstd.h>
#endif
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/ctree.h"
#include "common/defs.h"
#include "common/messages.h"
#include "common/utils.h"

View File

@ -16,9 +16,10 @@
#include "kerncompat.h"
#include <sys/stat.h>
#include <errno.h>
#include <stdbool.h>
#include <fcntl.h>
#include <stdlib.h>
#include <getopt.h>
#include <unistd.h>
#include "kernel-lib/list.h"
#include "common/messages.h"

View File

@ -30,7 +30,6 @@
#include <signal.h>
#include <stdbool.h>
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/ctree.h"
#include "common/utils.h"
#include "common/open-utils.h"
#include "common/help.h"

View File

@ -17,6 +17,7 @@
*/
#include "kerncompat.h"
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
@ -26,7 +27,10 @@
#include <stddef.h>
#include <string.h>
#include "kernel-lib/list.h"
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/extent-io-tree.h"
#include "kernel-shared/locking.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/disk-io.h"
#include "kernel-shared/volumes.h"

View File

@ -24,6 +24,8 @@
#include <unistd.h>
#include <string.h>
#include "kernel-lib/list.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/disk-io.h"
#include "kernel-shared/volumes.h"

View File

@ -19,15 +19,17 @@
#include "kerncompat.h"
#include <sys/stat.h>
#include <sys/sysmacros.h>
#include <getopt.h>
#include <errno.h>
#include <stdio.h>
#include <stdbool.h>
#include <unistd.h>
#include "kernel-lib/list.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/volumes.h"
#include "kernel-shared/transaction.h"
#include "kernel-shared/disk-io.h"
#include "kernel-shared/extent_io.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "common/messages.h"
#include "common/utils.h"
#include "common/help.h"

View File

@ -20,6 +20,7 @@
#include <sys/types.h>
#include <sys/xattr.h>
#include <sys/stat.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@ -38,6 +39,8 @@
#if COMPRESSION_ZSTD
#include <zstd.h>
#endif
#include "kernel-shared/accessors.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/disk-io.h"
#include "kernel-shared/print-tree.h"

View File

@ -34,7 +34,6 @@
#include <limits.h>
#include <dirent.h>
#include <errno.h>
#include <getopt.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
@ -43,7 +42,6 @@
#include <time.h>
#include <uuid/uuid.h>
#include "kernel-lib/sizes.h"
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/volumes.h"
#include "common/defs.h"
#include "common/messages.h"

View File

@ -18,6 +18,7 @@
#include "kerncompat.h"
#include <sys/ioctl.h>
#include <stdbool.h>
#include <unistd.h>
#include <fcntl.h>
#include <pthread.h>

View File

@ -23,9 +23,13 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <unistd.h>
#include <uuid/uuid.h>
#include "kernel-lib/rbtree.h"
#include "kernel-lib/rbtree_types.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/ctree.h"
#include "common/defs.h"
@ -39,6 +43,9 @@
#include "cmds/commands.h"
#include "cmds/subvolume.h"
enum btrfs_list_comp_enum;
enum btrfs_list_filter_enum;
/*
* Naming of options:
* - uppercase for filters and sort options

View File

@ -29,6 +29,8 @@
#include <time.h>
#include <uuid/uuid.h>
#include "libbtrfsutil/btrfsutil.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/ctree.h"
#include "common/defs.h"

View File

@ -15,7 +15,6 @@
*/
#include <stdio.h>
#include <stdbool.h>
#include "common/cpu-utils.h"
unsigned long __cpu_flags = CPU_FLAG_NONE;

View File

@ -23,7 +23,6 @@
#include <sys/stat.h>
#include <sys/sysmacros.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
@ -39,6 +38,8 @@
#endif
#include "kernel-lib/overflow.h"
#include "kernel-lib/list.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/volumes.h"

View File

@ -19,6 +19,7 @@
#include "kerncompat.h"
#include <dirent.h>
#include "kernel-lib/bitops.h"
#include "kernel-shared/uapi/btrfs.h"
#define BTRFS_SCAN_MOUNTED (1ULL << 0)

View File

@ -35,12 +35,13 @@
#include "kernel-shared/disk-io.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/zoned.h"
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "common/device-utils.h"
#include "common/sysfs-utils.h"
#include "common/path-utils.h"
#include "common/internal.h"
#include "common/messages.h"
#include "common/utils.h"
#include "common/units.h"
#ifndef BLKDISCARD

View File

@ -18,10 +18,12 @@
#define __DEVICE_UTILS_H__
#include "kerncompat.h"
#include <sys/stat.h>
#include <stdbool.h>
#include <unistd.h>
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-lib/bitops.h"
struct btrfs_ioctl_dev_info_args;
struct stat;
/*
* Options for btrfs_prepare_device

View File

@ -15,6 +15,10 @@
*/
#include "kerncompat.h"
#include <errno.h>
#include <stddef.h>
#include "kernel-shared/accessors.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/disk-io.h"
#include "kernel-shared/file-item.h"

View File

@ -17,6 +17,14 @@
#ifndef _EXTENT_TREE_UTILS_H_
#define _EXTENT_TREE_UTILS_H_
#include "kerncompat.h"
#include "kernel-lib/bitops.h"
struct btrfs_inode_item;
struct btrfs_path;
struct btrfs_root;
struct btrfs_trans_handle;
int btrfs_next_extent_item(struct btrfs_root *root, struct btrfs_path *path,
u64 max_objectid);
int btrfs_record_file_extent(struct btrfs_trans_handle *trans,

View File

@ -20,6 +20,8 @@
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/disk-io.h"
#include "kernel-shared/transaction.h"

View File

@ -22,7 +22,8 @@
#include <string.h>
#include <time.h>
#include <uuid/uuid.h>
#include "common/defs.h"
#include "kernel-shared/uapi/btrfs.h"
#include "common/messages.h"
#include "common/format-output.h"
#include "common/utils.h"
#include "common/units.h"

View File

@ -25,11 +25,11 @@
#include <string.h>
#include "kernel-lib/sizes.h"
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/ctree.h"
#include "common/fsfeatures.h"
#include "common/string-utils.h"
#include "common/sysfs-utils.h"
#include "common/utils.h"
#include "common/messages.h"
/*

View File

@ -19,6 +19,7 @@
#include <stdlib.h>
#include <string.h>
#include <getopt.h>
#include <unistd.h>
#include "common/help.h"
#include "common/string-utils.h"
#include "cmds/commands.h"

View File

@ -19,6 +19,8 @@
*/
#include "inject-error.h"
#include <stdlib.h>
#include <stdio.h>
#ifdef INJECT

View File

@ -17,8 +17,6 @@
#ifndef __INJECT_ERROR_H__
#define __INJECT_ERROR_H__
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#ifdef INJECT

View File

@ -16,6 +16,7 @@
#include <stdio.h>
#include <stdarg.h>
#include <stdbool.h>
#include "common/messages.h"
#include "common/utils.h"

View File

@ -19,6 +19,7 @@
#include <stddef.h>
#include <dirent.h>
#include <stdbool.h>
struct btrfs_fs_devices;

View File

@ -25,6 +25,7 @@
#include <strings.h>
#include "libbtrfsutil/btrfsutil.h"
#include "kernel-shared/volumes.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/compression.h"
#include "common/parse-utils.h"
#include "common/messages.h"

View File

@ -18,7 +18,6 @@
#define __PARSE_UTILS_H__
#include "kerncompat.h"
#include "kernel-shared/ctree.h"
u64 parse_size_from_string(const char *s);
enum btrfs_csum_type parse_csum_type(const char *s);

View File

@ -19,7 +19,8 @@
#ifndef __RBTREE_UTILS__
#define __RBTREE_UTILS__
#include "kernel-lib/rbtree.h"
struct rb_node;
struct rb_root;
/* The common insert/search/free functions */
typedef int (*rb_compare_nodes)(struct rb_node *node1, struct rb_node *node2);

View File

@ -16,13 +16,15 @@
* Boston, MA 021110-1307, USA.
*/
#include "kerncompat.h"
#include <unistd.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "kernel-shared/accessors.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/send.h"
#include "crypto/crc32c.h"
#include "common/send-stream.h"

View File

@ -21,6 +21,8 @@
#include "kerncompat.h"
struct timespec;
struct btrfs_send_ops {
int (*subvol)(const char *path, const u8 *uuid, u64 ctransid,
void *user);

View File

@ -16,6 +16,7 @@
* Boston, MA 021110-1307, USA.
*/
#include "kerncompat.h"
#include <sys/ioctl.h>
#include <unistd.h>
#include <fcntl.h>
@ -24,6 +25,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "kernel-shared/accessors.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/ctree.h"
#include "common/send-utils.h"

View File

@ -21,7 +21,6 @@
#include "kerncompat.h"
#include <stddef.h>
#include "kernel-shared/ctree.h"
enum subvol_search_type {
subvol_search_by_root_id,

View File

@ -17,6 +17,8 @@
#ifndef __COMMON_SYSFS_UTILS__
#define __COMMON_SYSFS_UTILS__
#include <stddef.h>
int sysfs_open_file(const char *name);
int sysfs_open_fsid_file(int fd, const char *filename);
int sysfs_open_fsid_dir(int fd, const char *dirname);

View File

@ -19,7 +19,11 @@
#include "kerncompat.h"
#include <sys/ioctl.h>
#include <sys/time.h>
#include <sys/sysinfo.h>
#include <sys/select.h>
#include <dirent.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -28,8 +32,9 @@
#include <mntent.h>
#include <ctype.h>
#include <limits.h>
#include <uuid/uuid.h>
#include "kernel-shared/uapi/btrfs.h"
#include <strings.h>
#include "kernel-lib/list.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/disk-io.h"
#include "kernel-shared/volumes.h"

View File

@ -20,17 +20,13 @@
#define __BTRFS_UTILS_H__
#include "kerncompat.h"
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include "kernel-lib/sizes.h"
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/ctree.h"
#include "common/defs.h"
#include "common/internal.h"
#include "common/messages.h"
#include "kernel-shared/volumes.h"
#include "common/fsfeatures.h"
struct list_head;
enum exclusive_operation {
BTRFS_EXCLOP_NONE,
BTRFS_EXCLOP_BALANCE,

View File

@ -14,6 +14,7 @@
* Boston, MA 021110-1307, USA.
*/
#include "kerncompat.h"
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
@ -21,13 +22,15 @@
#include <string.h>
#include <uuid/uuid.h>
#include "kernel-lib/sizes.h"
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/extent_io.h"
#include "kernel-shared/disk-io.h"
#include "kernel-shared/volumes.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "common/path-utils.h"
#include "common/messages.h"
#include "common/fsfeatures.h"
#include "mkfs/common.h"
#include "convert/common.h"

View File

@ -82,6 +82,7 @@
#include "kerncompat.h"
#include <sys/stat.h>
#include <linux/fs.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
@ -94,6 +95,8 @@
#include <string.h>
#include <uuid/uuid.h>
#include "kernel-lib/sizes.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/extent_io.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/disk-io.h"

View File

@ -19,6 +19,8 @@
#include <string.h>
#include <unistd.h>
#include "kernel-lib/sizes.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/disk-io.h"
#include "kernel-shared/volumes.h"
#include "common/internal.h"

View File

@ -20,12 +20,11 @@
#include "kerncompat.h"
#include <sys/types.h>
#include <pthread.h>
#include "kernel-shared/uapi/btrfs_tree.h"
#include "convert/common.h"
struct btrfs_convert_context;
struct btrfs_inode_item;
struct btrfs_root;
struct btrfs_trans_handle;
struct task_info;
#define CONV_IMAGE_SUBVOL_OBJECTID BTRFS_FIRST_FREE_OBJECTID

View File

@ -18,6 +18,7 @@
#define CRYPTO_HASH_H
#include "kerncompat.h"
#include <stddef.h>
#define CRYPTO_HASH_SIZE_MAX 32

View File

@ -1,8 +1,32 @@
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License v2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 021110-1307, USA.
*/
#include "kerncompat.h"
#include <sys/stat.h>
#include <stddef.h>
#include <linux/fs.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <stdbool.h>
#include <string.h>
#include "kernel-lib/sizes.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/extent_io.h"
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/disk-io.h"
#include "crypto/crc32c.h"

View File

@ -20,6 +20,8 @@
#include "kerncompat.h"
#include <stdio.h>
struct btrfs_fs_info;
void csum_block(u8 *buf, size_t len);
int detect_version(FILE *in);
int update_disk_super_on_device(struct btrfs_fs_info *info,

View File

@ -15,16 +15,31 @@
*/
#include "kerncompat.h"
#include <errno.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <pthread.h>
#include <zlib.h>
#include "kernel-lib/list.h"
#include "kernel-lib/rbtree.h"
#include "kernel-lib/rbtree_types.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/extent-io-tree.h"
#include "kernel-shared/extent_io.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/file-item.h"
#include "kernel-shared/disk-io.h"
#include "kernel-shared/volumes.h"
#include "kernel-shared/tree-checker.h"
#include "crypto/crc32c.h"
#include "common/internal.h"
#include "common/messages.h"
#include "image/sanitize.h"
#include "image/metadump.h"
#include "image/common.h"

View File

@ -15,15 +15,33 @@
*/
#include "kerncompat.h"
#include <sys/stat.h>
#include <linux/fs.h>
#include <errno.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <pthread.h>
#include <zlib.h>
#include "kernel-lib/list.h"
#include "kernel-lib/rbtree.h"
#include "kernel-lib/rbtree_types.h"
#include "kernel-lib/sizes.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/extent_io.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/disk-io.h"
#include "kernel-shared/volumes.h"
#include "kernel-shared/transaction.h"
#include "kernel-shared/tree-checker.h"
#include "common/internal.h"
#include "common/messages.h"
#include "common/open-utils.h"
#include "common/extent-cache.h"
#include "image/common.h"
#include "image/metadump.h"

View File

@ -17,41 +17,24 @@
*/
#include "kerncompat.h"
#include <sys/stat.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <getopt.h>
#include <errno.h>
#include <stdbool.h>
#include <stddef.h>
#include <string.h>
#include <time.h>
#include <zlib.h>
#include "kernel-lib/list.h"
#include "kernel-lib/rbtree.h"
#include "kernel-lib/rbtree_types.h"
#include "kernel-lib/sizes.h"
#include "kernel-shared/uapi/btrfs.h"
#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 "kernel-shared/file-item.h"
#include "kernel-shared/tree-checker.h"
#include "crypto/crc32c.h"
#include "kernel-shared/accessors.h"
#include "crypto/hash.h"
#include "common/internal.h"
#include "common/messages.h"
#include "common/cpu-utils.h"
#include "common/box.h"
#include "common/utils.h"
#include "common/extent-cache.h"
#include "common/help.h"
#include "common/device-utils.h"
#include "common/open-utils.h"
#include "common/string-utils.h"
#include "cmds/commands.h"

View File

@ -15,9 +15,12 @@
*/
#include "kerncompat.h"
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include "kernel-lib/rbtree.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/extent_io.h"
#include "common/internal.h"

View File

@ -4,6 +4,8 @@
*/
#include "kerncompat.h"
#include <stdio.h>
#include <string.h>
#include "kernel-lib/list_sort.h"
#include "kernel-lib/list.h"

View File

@ -4,8 +4,6 @@
#ifndef _LINUX_LIST_SORT_H
#define _LINUX_LIST_SORT_H
#include "kerncompat.h"
struct list_head;
void list_sort(void *priv, struct list_head *head,

View File

@ -21,14 +21,15 @@
*
* This file was postprocessed using unroll.pl and then ported to userspace
*/
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <unistd.h>
#include "kerncompat.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/disk-io.h"
#include "kernel-shared/volumes.h"
#include "common/utils.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-lib/raid56.h"
#include "common/messages.h"
/*
* This is the C data type to use

View File

@ -23,6 +23,8 @@
#define __BTRFS_PROGS_RAID56_H__
#include "kerncompat.h"
#include <stddef.h>
#include "kernel-lib/bitops.h"
void raid6_gen_syndrome(int disks, size_t bytes, void **ptrs);
int raid5_gen_result(int nr_devs, size_t stripe_len, int dest, void **data);

View File

@ -21,7 +21,12 @@
linux/lib/rbtree.c
*/
#include "kerncompat.h"
#include <stdbool.h>
#include <stddef.h>
#include "kernel-lib/rbtree_types.h"
#include "kernel-lib/rbtree_augmented.h"
#include "kernel-lib/rbtree.h"
/*
* red-black trees properties: https://en.wikipedia.org/wiki/Rbtree

View File

@ -37,6 +37,7 @@
#include <btrfs/rbtree_types.h>
#endif /* BTRFS_FLAT_INCLUDES */
#include <stddef.h>
#include <stdbool.h>
#ifdef __cplusplus

View File

@ -4,8 +4,10 @@
*/
#include "kerncompat.h"
#include <stdbool.h>
#include "kernel-shared/extent_io.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/messages.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/accessors.h"
static bool check_setget_bounds(const struct extent_buffer *eb,

View File

@ -4,6 +4,12 @@
#define BTRFS_ACCESSORS_H
#include "kerncompat.h"
#include <stddef.h>
#include <string.h>
#include "kernel-lib/bitops.h"
#include "kernel-shared/extent_io.h"
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#ifndef _static_assert
#define _static_assert(expr) _Static_assert(expr, #expr)

View File

@ -5,10 +5,11 @@
*/
#include "kerncompat.h"
#include <stddef.h>
#include "kernel-lib/bitops.h"
#include "kernel-lib/trace.h"
#include "kernel-shared/async-thread.h"
#include "kernel-shared/ctree.h"
#include "common/internal.h"
enum {
WORK_DONE_BIT,

View File

@ -8,7 +8,9 @@
#define BTRFS_ASYNC_THREAD_H
#include "kerncompat.h"
#include <stdbool.h>
#include "kernel-lib/list.h"
#include "kernel-lib/bitops.h"
struct btrfs_fs_info;
struct btrfs_workqueue;

View File

@ -17,13 +17,21 @@
*/
#include "kerncompat.h"
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <errno.h>
#include "kernel-lib/list.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/extent_io.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/disk-io.h"
#include "kernel-shared/backref.h"
#include "kernel-shared/ulist.h"
#include "kernel-shared/transaction.h"
#include "kernel-shared/messages.h"
#include "kernel-shared/tree-checker.h"
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "common/internal.h"
#define pr_debug(...) do { } while (0)

View File

@ -19,8 +19,18 @@
#ifndef __BTRFS_BACKREF_H__
#define __BTRFS_BACKREF_H__
#include "kernel-shared/ulist.h"
#include "kernel-shared/extent_io.h"
#include "kerncompat.h"
#include "kernel-lib/bitops.h"
struct btrfs_extent_item;
struct btrfs_fs_info;
struct btrfs_inode_extref;
struct btrfs_key;
struct btrfs_path;
struct btrfs_root;
struct btrfs_trans_handle;
struct extent_buffer;
struct ulist;
struct inode_fs_paths {
struct btrfs_path *btrfs_path;

View File

@ -16,6 +16,8 @@
* Boston, MA 021110-1307, USA.
*/
#include <errno.h>
#include <string.h>
#include "kernel-lib/bitops.h"
#include "kernel-lib/sizes.h"
#include "kernel-shared/ctree.h"
@ -26,8 +28,6 @@
#include "kernel-shared/volumes.h"
#include "common/internal.h"
#include "common/messages.h"
#include "common/utils.h"
#include "check/repair.h"
static int split_node(struct btrfs_trans_handle *trans, struct btrfs_root
*root, struct btrfs_path *path, int level);

View File

@ -19,19 +19,20 @@
#ifndef __BTRFS_CTREE_H__
#define __BTRFS_CTREE_H__
#include <stdbool.h>
#include "kernel-lib/list.h"
#include "kernel-lib/rbtree.h"
#include "kerncompat.h"
#include "common/extent-cache.h"
#include "crypto/crc32c.h"
#include <stdbool.h>
#include <stddef.h>
#include "kernel-lib/list.h"
#include "kernel-lib/bitops.h"
#include "kernel-lib/rbtree_types.h"
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/extent_io.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/extent-io-tree.h"
#include "kernel-shared/locking.h"
#include "crypto/crc32c.h"
#include "common/extent-cache.h"
struct btrfs_root;
struct btrfs_trans_handle;

View File

@ -17,6 +17,10 @@
* Boston, MA 021110-1307, USA.
*/
#include "kerncompat.h"
#include <string.h>
#include <errno.h>
#include "kernel-lib/rbtree.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/delayed-ref.h"
#include "kernel-shared/transaction.h"

View File

@ -21,7 +21,14 @@
#define BTRFS_DELAYED_REF_H
#include "kerncompat.h"
#include <stdbool.h>
#include "kernel-lib/list.h"
#include "kernel-lib/rbtree_types.h"
#include "kernel-lib/bitops.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/uapi/btrfs_tree.h"
struct btrfs_trans_handle;
struct btrfs_block_rsv;
/* these are the possible values of struct btrfs_delayed_ref_node->action */

View File

@ -16,10 +16,19 @@
* Boston, MA 021110-1307, USA.
*/
#include "kerncompat.h"
#include <linux/limits.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include "kernel-lib/bitops.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/disk-io.h"
#include "kernel-shared/transaction.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/extent_io.h"
#include "kernel-shared/uapi/btrfs_tree.h"
struct btrfs_trans_handle;
/*
* insert a name into a directory, doing overflow properly if there is a hash

View File

@ -16,29 +16,49 @@
* Boston, MA 021110-1307, USA.
*/
#include "kerncompat.h"
#include <sys/stat.h>
#include <linux/fs.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <uuid/uuid.h>
#include "kerncompat.h"
#include "kernel-lib/bitops.h"
#include "kernel-lib/list.h"
#include "kernel-lib/rbtree.h"
#include "kernel-lib/rbtree_types.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/extent-io-tree.h"
#include "kernel-shared/extent_io.h"
#include "kernel-shared/locking.h"
#include "kernel-shared/messages.h"
#include "kernel-shared/uapi/btrfs_tree.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/tree-checker.h"
#include "kernel-shared/zoned.h"
#include "kernel-shared/print-tree.h"
#include "crypto/hash.h"
#include "crypto/crc32c.h"
#include "common/defs.h"
#include "common/extent-cache.h"
#include "common/messages.h"
#include "common/utils.h"
#include "common/rbtree-utils.h"
#include "common/device-scan.h"
#include "common/device-utils.h"
struct btrfs_fs_devices;
struct btrfs_key;
struct btrfs_super_block;
struct btrfs_trans_handle;
struct extent_buffer;
struct rb_node;
/* specified errno for check_tree_block */
#define BTRFS_BAD_BYTENR (-1)
#define BTRFS_BAD_FSID (-2)

View File

@ -20,10 +20,19 @@
#define __BTRFS_DISK_IO_H__
#include "kerncompat.h"
#include "kernel-shared/ctree.h"
#include <stddef.h>
#include "kernel-lib/bitops.h"
#include "kernel-lib/sizes.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/uapi/btrfs.h"
struct btrfs_tree_parent_check;
struct btrfs_fs_devices;
struct btrfs_key;
struct btrfs_super_block;
struct btrfs_trans_handle;
struct extent_buffer;
struct rb_node;
#define BTRFS_SUPER_MIRROR_MAX 3
#define BTRFS_SUPER_MIRROR_SHIFT 12

View File

@ -1,15 +1,17 @@
// SPDX-License-Identifier: GPL-2.0
#include "kerncompat.h"
#include <errno.h>
#include "kernel-lib/trace.h"
#include "kernel-lib/rbtree.h"
#include "kernel-shared/messages.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/async-thread.h"
#include "kernel-shared/extent-io-tree.h"
#include "kernel-shared/misc.h"
#include "kernel-shared/ulist.h"
#include "common/internal.h"
struct btrfs_fs_info;
/*
* MODIFIED:
* - temporarily define this until we can sync everything.

View File

@ -4,10 +4,13 @@
#define BTRFS_EXTENT_IO_TREE_H
#include "kerncompat.h"
#include <stdbool.h>
#include <stddef.h>
#include "kernel-lib/rbtree_types.h"
#include "kernel-shared/misc.h"
struct extent_changeset;
struct io_failure_record;
struct btrfs_fs_info;
/* Bits for the extent state */
enum {

View File

@ -16,15 +16,24 @@
* Boston, MA 021110-1307, USA.
*/
#include "kerncompat.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <math.h>
#include "kerncompat.h"
#include <stdbool.h>
#include <errno.h>
#include <string.h>
#include "kernel-lib/bitops.h"
#include "kernel-lib/list.h"
#include "kernel-lib/rbtree.h"
#include "kernel-lib/rbtree_types.h"
#include "kernel-lib/sizes.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/delayed-ref.h"
#include "kernel-shared/extent-io-tree.h"
#include "kernel-shared/extent_io.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/disk-io.h"
#include "kernel-shared/messages.h"
#include "kernel-shared/print-tree.h"
#include "kernel-shared/transaction.h"
#include "kernel-shared/volumes.h"
@ -32,7 +41,12 @@
#include "kernel-shared/free-space-tree.h"
#include "kernel-shared/zoned.h"
#include "kernel-shared/file-item.h"
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "crypto/crc32c.h"
#include "common/extent-cache.h"
#include "common/internal.h"
#include "common/messages.h"
#include "common/utils.h"
#define PENDING_EXTENT_INSERT 0

View File

@ -16,22 +16,25 @@
* Boston, MA 021110-1307, USA.
*/
#include "kerncompat.h"
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdbool.h>
#include "kerncompat.h"
#include "kernel-shared/extent_io.h"
#include <string.h>
#include <errno.h>
#include "kernel-lib/list.h"
#include "kernel-lib/raid56.h"
#include "kernel-lib/bitmap.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/extent-io-tree.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/messages.h"
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "common/messages.h"
#include "common/utils.h"
#include "common/device-utils.h"
#include "common/internal.h"

View File

@ -20,10 +20,9 @@
#define __BTRFS_EXTENT_IO_H__
#include "kerncompat.h"
#include "common/extent-cache.h"
#include "kernel-lib/bitops.h"
#include "kernel-lib/list.h"
struct extent_io_tree;
#include "common/extent-cache.h"
#define EXTENT_BUFFER_UPTODATE (1U << 0)
#define EXTENT_BUFFER_DIRTY (1U << 1)

View File

@ -16,15 +16,15 @@
* Boston, MA 021110-1307, USA.
*/
#include <stdio.h>
#include <stdlib.h>
#include "kerncompat.h"
#include <stdio.h>
#include <errno.h>
#include "kernel-shared/ctree.h"
#include "kernel-shared/disk-io.h"
#include "kernel-shared/transaction.h"
#include "kernel-shared/print-tree.h"
#include "kernel-shared/file-item.h"
#include "crypto/crc32c.h"
#include "kernel-shared/extent_io.h"
#include "kernel-shared/uapi/btrfs.h"
#include "common/internal.h"
#define MAX_CSUM_ITEMS(r, size) ((((BTRFS_LEAF_DATA_SIZE(r->fs_info) - \

View File

@ -4,13 +4,21 @@
#define BTRFS_FILE_ITEM_H
#include "kerncompat.h"
#include <stdbool.h>
#include <stddef.h>
#include "kernel-lib/bitops.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/accessors.h"
struct bio;
struct inode;
struct btrfs_ordered_sum;
struct btrfs_inode;
struct btrfs_trans_handle;
struct extent_map;
struct extent_buffer;
struct list_head;
#define BTRFS_FILE_EXTENT_INLINE_DATA_START \
(offsetof(struct btrfs_file_extent_item, disk_bytenr))

View File

@ -17,13 +17,20 @@
*/
#include "kerncompat.h"
#include <sys/stat.h>
#include <errno.h>
#include <string.h>
#include "kernel-lib/bitops.h"
#include "kernel-shared/accessors.h"
#include "kernel-shared/extent_io.h"
#include "kernel-shared/uapi/btrfs.h"
#include "kernel-shared/uapi/btrfs_tree.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/disk-io.h"
#include "kernel-shared/transaction.h"
#include "kernel-shared/compression.h"
#include "kernel-shared/file-item.h"
#include "common/utils.h"
#include "common/internal.h"
#include "common/messages.h"
struct btrfs_trans_handle;
/*
* Get the first file extent that covers (part of) the given range

Some files were not shown because too many files have changed in this diff Show More