Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dcc6d073 authored by Chris Mason's avatar Chris Mason
Browse files

Merge branch 'delayed_inode' into inode_numbers



Conflicts:
	fs/btrfs/inode.c
	fs/btrfs/ioctl.c
	fs/btrfs/transaction.c

Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parents 09655373 16cdcec7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7,4 +7,4 @@ btrfs-y += super.o ctree.o extent-tree.o print-tree.o root-tree.o dir-item.o \
	   extent_map.o sysfs.o struct-funcs.o xattr.o ordered-data.o \
	   extent_io.o volumes.o async-thread.o ioctl.o locking.o orphan.o \
	   export.o tree-log.o acl.o free-space-cache.o zlib.o lzo.o \
	   compression.o delayed-ref.o relocation.o
	   compression.o delayed-ref.o relocation.o delayed-inode.o
+5 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
#include "extent_map.h"
#include "extent_io.h"
#include "ordered-data.h"
#include "delayed-inode.h"

/* in memory btrfs inode */
struct btrfs_inode {
@@ -158,9 +159,13 @@ struct btrfs_inode {
	 */
	unsigned force_compress:4;

	struct btrfs_delayed_node *delayed_node;

	struct inode vfs_inode;
};

extern unsigned char btrfs_filetype_table[];

static inline struct btrfs_inode *BTRFS_I(struct inode *inode)
{
	return container_of(inode, struct btrfs_inode, vfs_inode);
+4 −10
Original line number Diff line number Diff line
@@ -38,11 +38,6 @@ static int balance_node_right(struct btrfs_trans_handle *trans,
			      struct extent_buffer *src_buf);
static int del_ptr(struct btrfs_trans_handle *trans, struct btrfs_root *root,
		   struct btrfs_path *path, int level, int slot);
static int setup_items_for_insert(struct btrfs_trans_handle *trans,
			struct btrfs_root *root, struct btrfs_path *path,
			struct btrfs_key *cpu_key, u32 *data_size,
			u32 total_data, u32 total_size, int nr);


struct btrfs_path *btrfs_alloc_path(void)
{
@@ -3559,8 +3554,7 @@ out:
 * to save stack depth by doing the bulk of the work in a function
 * that doesn't call btrfs_search_slot
 */
static noinline_for_stack int
setup_items_for_insert(struct btrfs_trans_handle *trans,
int setup_items_for_insert(struct btrfs_trans_handle *trans,
			   struct btrfs_root *root, struct btrfs_path *path,
			   struct btrfs_key *cpu_key, u32 *data_size,
			   u32 total_data, u32 total_size, int nr)
+27 −2
Original line number Diff line number Diff line
@@ -870,6 +870,7 @@ struct btrfs_block_group_cache {
struct reloc_control;
struct btrfs_device;
struct btrfs_fs_devices;
struct btrfs_delayed_root;
struct btrfs_fs_info {
	u8 fsid[BTRFS_FSID_SIZE];
	u8 chunk_tree_uuid[BTRFS_UUID_SIZE];
@@ -896,7 +897,10 @@ struct btrfs_fs_info {
	/* logical->physical extent mapping */
	struct btrfs_mapping_tree mapping_tree;

	/* block reservation for extent, checksum and root tree */
	/*
	 * block reservation for extent, checksum, root tree and
	 * delayed dir index item
	 */
	struct btrfs_block_rsv global_block_rsv;
	/* block reservation for delay allocation */
	struct btrfs_block_rsv delalloc_block_rsv;
@@ -1023,6 +1027,7 @@ struct btrfs_fs_info {
	 * for the sys_munmap function call path
	 */
	struct btrfs_workers fixup_workers;
	struct btrfs_workers delayed_workers;
	struct task_struct *transaction_kthread;
	struct task_struct *cleaner_kthread;
	int thread_pool_size;
@@ -1080,6 +1085,8 @@ struct btrfs_fs_info {

	/* filesystem state */
	u64 fs_state;

	struct btrfs_delayed_root *delayed_root;
};

/*
@@ -1172,6 +1179,11 @@ struct btrfs_root {
	/* red-black tree that keeps track of in-memory inodes */
	struct rb_root inode_tree;

	/*
	 * radix tree that keeps track of delayed nodes of every inode,
	 * protected by inode_lock
	 */
	struct radix_tree_root delayed_nodes_tree;
	/*
	 * right now this just gets used so that a root has its own devid
	 * for stat.  It may be used for more later
@@ -2110,6 +2122,13 @@ static inline bool btrfs_mixed_space_info(struct btrfs_space_info *space_info)
}

/* extent-tree.c */
static inline u64 btrfs_calc_trans_metadata_size(struct btrfs_root *root,
						 int num_items)
{
	return (root->leafsize + root->nodesize * (BTRFS_MAX_LEVEL - 1)) *
		3 * num_items;
}

void btrfs_put_block_group(struct btrfs_block_group_cache *cache);
int btrfs_run_delayed_refs(struct btrfs_trans_handle *trans,
			   struct btrfs_root *root, unsigned long count);
@@ -2305,6 +2324,8 @@ void btrfs_release_path(struct btrfs_root *root, struct btrfs_path *p);
struct btrfs_path *btrfs_alloc_path(void);
void btrfs_free_path(struct btrfs_path *p);
void btrfs_set_path_blocking(struct btrfs_path *p);
void btrfs_clear_path_blocking(struct btrfs_path *p,
			       struct extent_buffer *held);
void btrfs_unlock_up_safe(struct btrfs_path *p, int level);

int btrfs_del_items(struct btrfs_trans_handle *trans, struct btrfs_root *root,
@@ -2316,6 +2337,10 @@ static inline int btrfs_del_item(struct btrfs_trans_handle *trans,
	return btrfs_del_items(trans, root, path, path->slots[0], 1);
}

int setup_items_for_insert(struct btrfs_trans_handle *trans,
			   struct btrfs_root *root, struct btrfs_path *path,
			   struct btrfs_key *cpu_key, u32 *data_size,
			   u32 total_data, u32 total_size, int nr);
int btrfs_insert_item(struct btrfs_trans_handle *trans, struct btrfs_root
		      *root, struct btrfs_key *key, void *data, u32 data_size);
int btrfs_insert_some_items(struct btrfs_trans_handle *trans,
@@ -2379,7 +2404,7 @@ void btrfs_check_and_init_root_item(struct btrfs_root_item *item);
/* dir-item.c */
int btrfs_insert_dir_item(struct btrfs_trans_handle *trans,
			  struct btrfs_root *root, const char *name,
			  int name_len, u64 dir,
			  int name_len, struct inode *dir,
			  struct btrfs_key *location, u8 type, u64 index);
struct btrfs_dir_item *btrfs_lookup_dir_item(struct btrfs_trans_handle *trans,
					     struct btrfs_root *root,
+1694 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading