mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
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:
parent
ad1ac5012c
commit
07e81dc944
1068
fs/btrfs/accessors.h
1068
fs/btrfs/accessors.h
File diff suppressed because it is too large
Load Diff
@ -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
|
||||
|
@ -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)
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "block-group.h"
|
||||
#include "disk-io.h"
|
||||
#include "fs.h"
|
||||
#include "accessors.h"
|
||||
|
||||
/*
|
||||
* HOW DO BLOCK RESERVES WORK
|
||||
|
@ -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
fs/btrfs/ctree.h
1090
fs/btrfs/ctree.h
File diff suppressed because it is too large
Load Diff
@ -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
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "zoned.h"
|
||||
#include "block-group.h"
|
||||
#include "fs.h"
|
||||
#include "accessors.h"
|
||||
|
||||
/*
|
||||
* Device replace overview
|
||||
|
@ -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
|
||||
|
@ -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 |\
|
||||
|
@ -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)
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "zoned.h"
|
||||
#include "dev-replace.h"
|
||||
#include "fs.h"
|
||||
#include "accessors.h"
|
||||
|
||||
#undef SCRAMBLE_DELAYED_REFS
|
||||
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "block-group.h"
|
||||
#include "compression.h"
|
||||
#include "fs.h"
|
||||
#include "accessors.h"
|
||||
|
||||
static struct kmem_cache *extent_buffer_cache;
|
||||
|
||||
|
@ -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) / \
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "reflink.h"
|
||||
#include "subpage.h"
|
||||
#include "fs.h"
|
||||
#include "accessors.h"
|
||||
|
||||
static struct kmem_cache *btrfs_inode_defrag_cachep;
|
||||
/*
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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)
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "ctree.h"
|
||||
#include "extent_io.h"
|
||||
#include "locking.h"
|
||||
#include "accessors.h"
|
||||
|
||||
/*
|
||||
* Lockdep class keys for extent_buffer->lock's in this root. For a given
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "ctree.h"
|
||||
#include "disk-io.h"
|
||||
#include "print-tree.h"
|
||||
#include "accessors.h"
|
||||
|
||||
struct root_name_map {
|
||||
u64 id;
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "compression.h"
|
||||
#include "space-info.h"
|
||||
#include "fs.h"
|
||||
#include "accessors.h"
|
||||
|
||||
#define BTRFS_PROP_HANDLERS_HT_BITS 8
|
||||
static DEFINE_HASHTABLE(prop_handlers_ht, BTRFS_PROP_HANDLERS_HT_BITS);
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "sysfs.h"
|
||||
#include "tree-mod-log.h"
|
||||
#include "fs.h"
|
||||
#include "accessors.h"
|
||||
|
||||
/*
|
||||
* Helpers to access qgroup reservation
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "delayed-ref.h"
|
||||
#include "ref-verify.h"
|
||||
#include "fs.h"
|
||||
#include "accessors.h"
|
||||
|
||||
/*
|
||||
* Used to keep track the roots and number of refs each root has for a given
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "reflink.h"
|
||||
#include "transaction.h"
|
||||
#include "subpage.h"
|
||||
#include "accessors.h"
|
||||
|
||||
#define BTRFS_MAX_DEDUPE_LEN SZ_16M
|
||||
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "inode-item.h"
|
||||
#include "space-info.h"
|
||||
#include "fs.h"
|
||||
#include "accessors.h"
|
||||
|
||||
/*
|
||||
* Relocation overview
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "print-tree.h"
|
||||
#include "qgroup.h"
|
||||
#include "space-info.h"
|
||||
#include "accessors.h"
|
||||
|
||||
/*
|
||||
* Read a root item from the tree. In case we detect a root item smaller then
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "block-group.h"
|
||||
#include "zoned.h"
|
||||
#include "fs.h"
|
||||
#include "accessors.h"
|
||||
|
||||
/*
|
||||
* This is only the first step towards a full-features scrub. It reads all
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "compression.h"
|
||||
#include "xattr.h"
|
||||
#include "print-tree.h"
|
||||
#include "accessors.h"
|
||||
|
||||
/*
|
||||
* Maximum number of references an extent can have in order for us to attempt to
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "block-group.h"
|
||||
#include "zoned.h"
|
||||
#include "fs.h"
|
||||
#include "accessors.h"
|
||||
|
||||
/*
|
||||
* HOW DOES SPACE RESERVATION WORK
|
||||
|
@ -51,6 +51,7 @@
|
||||
#include "qgroup.h"
|
||||
#include "raid56.h"
|
||||
#include "fs.h"
|
||||
#include "accessors.h"
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include <trace/events/btrfs.h>
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "qgroup.h"
|
||||
#include "misc.h"
|
||||
#include "fs.h"
|
||||
#include "accessors.h"
|
||||
|
||||
/*
|
||||
* Structure name Path
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "../ctree.h"
|
||||
#include "../extent_io.h"
|
||||
#include "../disk-io.h"
|
||||
#include "../accessors.h"
|
||||
|
||||
static int test_btrfs_split_item(u32 sectorsize, u32 nodesize)
|
||||
{
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "../free-space-tree.h"
|
||||
#include "../transaction.h"
|
||||
#include "../block-group.h"
|
||||
#include "../accessors.h"
|
||||
|
||||
struct free_space_extent {
|
||||
u64 start;
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "../extent_io.h"
|
||||
#include "../volumes.h"
|
||||
#include "../compression.h"
|
||||
#include "../accessors.h"
|
||||
|
||||
static void insert_extent(struct btrfs_root *root, u64 start, u64 len,
|
||||
u64 ram_bytes, u64 offset, u64 disk_bytenr,
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "../qgroup.h"
|
||||
#include "../backref.h"
|
||||
#include "../fs.h"
|
||||
#include "../accessors.h"
|
||||
|
||||
static int insert_normal_tree_ref(struct btrfs_root *root, u64 bytenr,
|
||||
u64 num_bytes, u64 parent, u64 root_objectid)
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "space-info.h"
|
||||
#include "zoned.h"
|
||||
#include "fs.h"
|
||||
#include "accessors.h"
|
||||
|
||||
static struct kmem_cache *btrfs_trans_handle_cachep;
|
||||
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "misc.h"
|
||||
#include "btrfs_inode.h"
|
||||
#include "fs.h"
|
||||
#include "accessors.h"
|
||||
|
||||
/*
|
||||
* Error message should follow the following format:
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "print-tree.h"
|
||||
#include "transaction.h"
|
||||
#include "locking.h"
|
||||
#include "accessors.h"
|
||||
|
||||
/*
|
||||
* Defrag all the leaves in a given btree.
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "tree-mod-log.h"
|
||||
#include "disk-io.h"
|
||||
#include "fs.h"
|
||||
#include "accessors.h"
|
||||
|
||||
struct tree_mod_root {
|
||||
u64 logical;
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "disk-io.h"
|
||||
#include "print-tree.h"
|
||||
#include "fs.h"
|
||||
|
||||
#include "accessors.h"
|
||||
|
||||
static void btrfs_uuid_to_key(u8 *uuid, u8 type, struct btrfs_key *key)
|
||||
{
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "disk-io.h"
|
||||
#include "locking.h"
|
||||
#include "fs.h"
|
||||
#include "accessors.h"
|
||||
|
||||
/*
|
||||
* Implementation of the interface defined in struct fsverity_operations.
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "discard.h"
|
||||
#include "zoned.h"
|
||||
#include "fs.h"
|
||||
#include "accessors.h"
|
||||
|
||||
static struct bio_set btrfs_bioset;
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "disk-io.h"
|
||||
#include "props.h"
|
||||
#include "locking.h"
|
||||
#include "accessors.h"
|
||||
|
||||
int btrfs_getxattr(struct inode *inode, const char *name,
|
||||
void *buffer, size_t size)
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "dev-replace.h"
|
||||
#include "space-info.h"
|
||||
#include "fs.h"
|
||||
#include "accessors.h"
|
||||
|
||||
/* Maximum number of zones to report per blkdev_report_zones() call */
|
||||
#define BTRFS_REPORT_NR_ZONES 4096
|
||||
|
Loading…
Reference in New Issue
Block a user