btrfs: move accessor helpers into accessors.h

This is a large patch, but because they're all macros it's impossible to
split up.  Simply copy all of the item accessors in ctree.h and paste
them in accessors.h, and then update any files to include the header so
everything compiles.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ reformat comments, style fixups ]
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Josef Bacik
2022-12-05 18:00:42 +01:00
committed by David Sterba
parent ad1ac5012c
commit 07e81dc944
46 changed files with 1112 additions and 1091 deletions
+1068
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -16,6 +16,7 @@
#include "misc.h"
#include "tree-mod-log.h"
#include "fs.h"
#include "accessors.h"
/* Just arbitrary numbers so we can be sure one of these happened. */
#define BACKREF_FOUND_SHARED 6
+1
View File
@@ -18,6 +18,7 @@
#include "raid56.h"
#include "zoned.h"
#include "fs.h"
#include "accessors.h"
#ifdef CONFIG_BTRFS_DEBUG
int btrfs_should_fragment_free_space(struct btrfs_block_group *block_group)
+1
View File
@@ -8,6 +8,7 @@
#include "block-group.h"
#include "disk-io.h"
#include "fs.h"
#include "accessors.h"
/*
* HOW DO BLOCK RESERVES WORK
+1
View File
@@ -93,6 +93,7 @@
#include "check-integrity.h"
#include "rcu-string.h"
#include "compression.h"
#include "accessors.h"
#define BTRFSIC_BLOCK_HASHTABLE_SIZE 0x10000
#define BTRFSIC_BLOCK_LINK_HASHTABLE_SIZE 0x10000
-1090
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -17,6 +17,7 @@
#include "locking.h"
#include "inode-item.h"
#include "space-info.h"
#include "accessors.h"
#define BTRFS_DELAYED_WRITEBACK 512
#define BTRFS_DELAYED_BACKGROUND 128
+1
View File
@@ -24,6 +24,7 @@
#include "zoned.h"
#include "block-group.h"
#include "fs.h"
#include "accessors.h"
/*
* Device replace overview
+1
View File
@@ -7,6 +7,7 @@
#include "ctree.h"
#include "disk-io.h"
#include "transaction.h"
#include "accessors.h"
/*
* insert a name into a directory, doing overflow properly if there is a hash
+1
View File
@@ -44,6 +44,7 @@
#include "zoned.h"
#include "subpage.h"
#include "fs.h"
#include "accessors.h"
#define BTRFS_SUPER_FLAG_SUPP (BTRFS_HEADER_FLAG_WRITTEN |\
BTRFS_HEADER_FLAG_RELOC |\
+1
View File
@@ -7,6 +7,7 @@
#include "btrfs_inode.h"
#include "print-tree.h"
#include "export.h"
#include "accessors.h"
#define BTRFS_FID_SIZE_NON_CONNECTABLE (offsetof(struct btrfs_fid, \
parent_objectid) / 4)
+1
View File
@@ -37,6 +37,7 @@
#include "zoned.h"
#include "dev-replace.h"
#include "fs.h"
#include "accessors.h"
#undef SCRAMBLE_DELAYED_REFS
+1
View File
@@ -31,6 +31,7 @@
#include "block-group.h"
#include "compression.h"
#include "fs.h"
#include "accessors.h"
static struct kmem_cache *extent_buffer_cache;
+1
View File
@@ -18,6 +18,7 @@
#include "print-tree.h"
#include "compression.h"
#include "fs.h"
#include "accessors.h"
#define __MAX_CSUM_ITEMS(r, size) ((unsigned long)(((BTRFS_LEAF_DATA_SIZE(r) - \
sizeof(struct btrfs_item) * 2) / \
+1
View File
@@ -31,6 +31,7 @@
#include "reflink.h"
#include "subpage.h"
#include "fs.h"
#include "accessors.h"
static struct kmem_cache *btrfs_inode_defrag_cachep;
/*
+1
View File
@@ -26,6 +26,7 @@
#include "discard.h"
#include "subpage.h"
#include "inode-item.h"
#include "accessors.h"
#define BITS_PER_BITMAP (PAGE_SIZE * 8UL)
#define MAX_CACHE_BYTES_PER_GIG SZ_64K
+1
View File
@@ -13,6 +13,7 @@
#include "transaction.h"
#include "block-group.h"
#include "fs.h"
#include "accessors.h"
static int __add_block_group_free_space(struct btrfs_trans_handle *trans,
struct btrfs_block_group *block_group,
+1
View File
@@ -3,6 +3,7 @@
#include "messages.h"
#include "ctree.h"
#include "fs.h"
#include "accessors.h"
void __btrfs_set_fs_incompat(struct btrfs_fs_info *fs_info, u64 flag,
const char *name)
+1
View File
@@ -11,6 +11,7 @@
#include "transaction.h"
#include "print-tree.h"
#include "space-info.h"
#include "accessors.h"
struct btrfs_inode_ref *btrfs_find_name_in_backref(struct extent_buffer *leaf,
int slot, const char *name,
+1
View File
@@ -51,6 +51,7 @@
#include "block-group.h"
#include "subpage.h"
#include "fs.h"
#include "accessors.h"
#ifdef CONFIG_64BIT
/* If we have a 32-bit userspace and 64-bit kernel, then the UAPI

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