btrfs: update include and forward declarations in headers

Pass over all header files and add missing forward declarations,
includes or fix include types.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba
2025-02-12 21:22:16 +01:00
parent f867ccabb8
commit 6149c82bda
24 changed files with 32 additions and 7 deletions

View File

@@ -12,6 +12,7 @@
#include <linux/string.h>
#include <linux/mm.h>
#include <uapi/linux/btrfs_tree.h>
#include "extent_io.h"
struct extent_buffer;

View File

@@ -3,6 +3,8 @@
#ifndef BTRFS_ACL_H
#define BTRFS_ACL_H
#include <linux/types.h>
struct posix_acl;
struct inode;
struct btrfs_trans_handle;

View File

@@ -6,7 +6,7 @@
#ifndef BTRFS_CTREE_H
#define BTRFS_CTREE_H
#include "linux/cleanup.h"
#include <linux/cleanup.h>
#include <linux/spinlock.h>
#include <linux/rbtree.h>
#include <linux/mutex.h>

View File

@@ -14,6 +14,8 @@
#include <linux/spinlock.h>
#include <linux/slab.h>
#include <uapi/linux/btrfs_tree.h>
#include "fs.h"
#include "messages.h"
struct btrfs_trans_handle;
struct btrfs_fs_info;

View File

@@ -10,6 +10,7 @@ struct fscrypt_str;
struct btrfs_fs_info;
struct btrfs_key;
struct btrfs_path;
struct btrfs_inode;
struct btrfs_root;
struct btrfs_trans_handle;

View File

@@ -5,6 +5,8 @@
#include <linux/types.h>
struct kiocb;
int __init btrfs_init_dio(void);
void __cold btrfs_destroy_dio(void);

View File

@@ -3,6 +3,7 @@
#ifndef BTRFS_DISCARD_H
#define BTRFS_DISCARD_H
#include <linux/types.h>
#include <linux/sizes.h>
struct btrfs_fs_info;

View File

@@ -4,7 +4,6 @@
#define BTRFS_EXTENT_TREE_H
#include <linux/types.h>
#include "misc.h"
#include "block-group.h"
#include "locking.h"

View File

@@ -3,8 +3,10 @@
#ifndef BTRFS_FILE_ITEM_H
#define BTRFS_FILE_ITEM_H
#include <linux/blk_types.h>
#include <linux/list.h>
#include <uapi/linux/btrfs_tree.h>
#include "ctree.h"
#include "accessors.h"
struct extent_map;

View File

@@ -9,6 +9,8 @@ struct file;
struct extent_state;
struct kiocb;
struct iov_iter;
struct inode;
struct folio;
struct page;
struct btrfs_ioctl_encoded_io_args;
struct btrfs_drop_extents_args;

View File

@@ -1,7 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include "messages.h"
#include "ctree.h"
#include "fs.h"
#include "accessors.h"
#include "volumes.h"

View File

@@ -9,6 +9,8 @@ struct file;
struct dentry;
struct mnt_idmap;
struct fileattr;
struct inode;
struct io_uring_cmd;
struct btrfs_fs_info;
struct btrfs_ioctl_balance_args;

View File

@@ -9,7 +9,6 @@
#include <linux/page-flags.h>
#include <asm/bug.h>
#include <trace/events/btrfs.h>
#include "misc.h"
#include "ctree.h"
#include "extent_io.h"
#include "locking.h"

View File

@@ -17,6 +17,7 @@
struct inode;
struct page;
struct extent_state;
struct btrfs_block_group;
struct btrfs_inode;
struct btrfs_root;
struct btrfs_fs_info;

View File

@@ -6,6 +6,8 @@
#ifndef BTRFS_PRINT_TREE_H
#define BTRFS_PRINT_TREE_H
#include <linux/types.h>
/* Buffer size to contain tree name and possibly additional data (offset) */
#define BTRFS_ROOT_NAME_BUF_LEN 48

View File

@@ -6,6 +6,7 @@
#ifndef BTRFS_PROPS_H
#define BTRFS_PROPS_H
#include <linux/types.h>
#include <linux/compiler_types.h>
struct inode;

View File

@@ -22,6 +22,9 @@ struct btrfs_ioctl_quota_ctl_args;
struct btrfs_trans_handle;
struct btrfs_delayed_ref_root;
struct btrfs_inode;
struct btrfs_transaction;
struct btrfs_block_group;
struct btrfs_qgroup_swapped_blocks;
/*
* Btrfs qgroup overview

View File

@@ -9,6 +9,7 @@
#include <linux/types.h>
#include <uapi/linux/btrfs_tree.h>
#include "fs.h"
#include "accessors.h"
#define BTRFS_RST_SUPP_BLOCK_GROUP_MASK (BTRFS_BLOCK_GROUP_DUP | \
BTRFS_BLOCK_GROUP_RAID1_MASK | \

View File

@@ -16,7 +16,6 @@
#include <linux/compat.h>
#include <linux/crc32c.h>
#include <linux/fsverity.h>
#include "send.h"
#include "ctree.h"
#include "backref.h"

View File

@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include "linux/spinlock.h"
#include <linux/spinlock.h>
#include <linux/minmax.h>
#include "misc.h"
#include "ctree.h"

View File

@@ -2,7 +2,6 @@
#include <linux/slab.h>
#include "messages.h"
#include "ctree.h"
#include "subpage.h"
#include "btrfs_inode.h"

View File

@@ -7,6 +7,7 @@
#include <linux/compiler_types.h>
#include <linux/kobject.h>
struct block_device;
struct btrfs_fs_info;
struct btrfs_device;
struct btrfs_fs_devices;

View File

@@ -7,6 +7,7 @@
#define BTRFS_VOLUMES_H
#include <linux/blk_types.h>
#include <linux/blkdev.h>
#include <linux/sizes.h>
#include <linux/atomic.h>
#include <linux/sort.h>
@@ -18,14 +19,17 @@
#include <linux/completion.h>
#include <linux/rbtree.h>
#include <uapi/linux/btrfs.h>
#include <uapi/linux/btrfs_tree.h>
#include "messages.h"
#include "rcu-string.h"
#include "extent-io-tree.h"
struct block_device;
struct bdev_handle;
struct btrfs_fs_info;
struct btrfs_block_group;
struct btrfs_trans_handle;
struct btrfs_transaction;
struct btrfs_zoned_device_info;
#define BTRFS_MAX_DATA_CHUNK_SIZE (10ULL * SZ_1G)

View File

@@ -6,6 +6,8 @@
#ifndef BTRFS_XATTR_H
#define BTRFS_XATTR_H
#include <linux/types.h>
struct dentry;
struct inode;
struct qstr;