summaryrefslogtreecommitdiff
path: root/transaction.h
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2018-06-08 17:53:29 +0300
committerDavid Sterba <dsterba@suse.com>2018-10-23 14:48:41 +0200
commitc6039704c580aeac32d26d858f402be537cbe819 (patch)
tree8cc6f67fc01c51172ac29244586fa9a9378b4fed /transaction.h
parent3c8faad5cffdc78c12d318bf4ecd422b9d8f1ab2 (diff)
btrfs-progs: Add delayed refs infrastructure
This commit pulls those portions of the kernel implementation of delayed refs which are necessary to have them working in user-space. I've done the following modifications: 1. Replaced all kmem_cache_alloc calls to kmalloc. 2. Removed all locking-related code, since we are single threaded in userspace. 3. Removed code which deals with data refs - delayed refs in user space are going to be used only for cowonly trees. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'transaction.h')
-rw-r--r--transaction.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/transaction.h b/transaction.h
index 750e329e..34060252 100644
--- a/transaction.h
+++ b/transaction.h
@@ -21,6 +21,7 @@
#include "kerncompat.h"
#include "ctree.h"
+#include "delayed-ref.h"
struct btrfs_trans_handle {
struct btrfs_fs_info *fs_info;
@@ -28,9 +29,12 @@ struct btrfs_trans_handle {
u64 alloc_exclude_start;
u64 alloc_exclude_nr;
bool reinit_extent_tree;
+ u64 delayed_ref_updates;
unsigned long blocks_reserved;
unsigned long blocks_used;
struct btrfs_block_group_cache *block_group;
+ struct btrfs_delayed_ref_root delayed_refs;
+
};
struct btrfs_trans_handle* btrfs_start_transaction(struct btrfs_root *root,