Lines Matching refs:extent_op
59 static void __run_delayed_extent_op(struct btrfs_delayed_extent_op *extent_op,
68 struct btrfs_delayed_extent_op *extent_op);
911 if (head->extent_op && head->extent_op->update_flags) in btrfs_lookup_extent_info()
912 extent_flags |= head->extent_op->flags_to_set; in btrfs_lookup_extent_info()
1675 struct btrfs_delayed_extent_op *extent_op) in setup_inline_extent_backref() argument
1699 if (extent_op) in setup_inline_extent_backref()
1700 __run_delayed_extent_op(extent_op, leaf, ei); in setup_inline_extent_backref()
1764 struct btrfs_delayed_extent_op *extent_op, in update_inline_extent_backref() argument
1784 if (extent_op) in update_inline_extent_backref()
1785 __run_delayed_extent_op(extent_op, leaf, ei); in update_inline_extent_backref()
1834 struct btrfs_delayed_extent_op *extent_op) in insert_inline_extent_backref() argument
1845 extent_op, NULL); in insert_inline_extent_backref()
1849 refs_to_add, extent_op); in insert_inline_extent_backref()
2111 struct btrfs_delayed_extent_op *extent_op) in __btrfs_inc_extent_ref() argument
2131 offset, refs_to_add, extent_op); in __btrfs_inc_extent_ref()
2145 if (extent_op) in __btrfs_inc_extent_ref()
2146 __run_delayed_extent_op(extent_op, leaf, item); in __btrfs_inc_extent_ref()
2165 struct btrfs_delayed_extent_op *extent_op, in run_delayed_data_ref() argument
2187 if (extent_op) in run_delayed_data_ref()
2188 flags |= extent_op->flags_to_set; in run_delayed_data_ref()
2196 node->ref_mod, extent_op); in run_delayed_data_ref()
2201 extent_op); in run_delayed_data_ref()
2208 static void __run_delayed_extent_op(struct btrfs_delayed_extent_op *extent_op, in __run_delayed_extent_op() argument
2213 if (extent_op->update_flags) { in __run_delayed_extent_op()
2214 flags |= extent_op->flags_to_set; in __run_delayed_extent_op()
2218 if (extent_op->update_key) { in __run_delayed_extent_op()
2222 btrfs_set_tree_block_key(leaf, bi, &extent_op->key); in __run_delayed_extent_op()
2228 struct btrfs_delayed_extent_op *extent_op) in run_delayed_extent_op() argument
2238 int metadata = !extent_op->is_data; in run_delayed_extent_op()
2254 key.offset = extent_op->level; in run_delayed_extent_op()
2305 __run_delayed_extent_op(extent_op, leaf, ei); in run_delayed_extent_op()
2315 struct btrfs_delayed_extent_op *extent_op, in run_delayed_tree_ref() argument
2338 BUG_ON(!extent_op || !extent_op->update_flags); in run_delayed_tree_ref()
2339 ret = alloc_reserved_tree_block(trans, node, extent_op); in run_delayed_tree_ref()
2342 ref->level, 0, 1, extent_op); in run_delayed_tree_ref()
2345 ref->level, 0, 1, extent_op); in run_delayed_tree_ref()
2355 struct btrfs_delayed_extent_op *extent_op, in run_one_delayed_ref() argument
2369 ret = run_delayed_tree_ref(trans, node, extent_op, in run_one_delayed_ref()
2373 ret = run_delayed_data_ref(trans, node, extent_op, in run_one_delayed_ref()
2420 struct btrfs_delayed_extent_op *extent_op = head->extent_op; in cleanup_extent_op() local
2423 if (!extent_op) in cleanup_extent_op()
2425 head->extent_op = NULL; in cleanup_extent_op()
2427 btrfs_free_delayed_extent_op(extent_op); in cleanup_extent_op()
2431 ret = run_delayed_extent_op(trans, head, extent_op); in cleanup_extent_op()
2432 btrfs_free_delayed_extent_op(extent_op); in cleanup_extent_op()
2462 if (!RB_EMPTY_ROOT(&head->ref_tree) || head->extent_op) { in cleanup_ref_head()
2527 struct btrfs_delayed_extent_op *extent_op; in __btrfs_run_delayed_refs() local
2639 extent_op = locked_ref->extent_op; in __btrfs_run_delayed_refs()
2640 locked_ref->extent_op = NULL; in __btrfs_run_delayed_refs()
2643 ret = run_one_delayed_ref(trans, ref, extent_op, in __btrfs_run_delayed_refs()
2646 btrfs_free_delayed_extent_op(extent_op); in __btrfs_run_delayed_refs()
2979 struct btrfs_delayed_extent_op *extent_op; in btrfs_set_disk_extent_flags() local
2982 extent_op = btrfs_alloc_delayed_extent_op(); in btrfs_set_disk_extent_flags()
2983 if (!extent_op) in btrfs_set_disk_extent_flags()
2986 extent_op->flags_to_set = flags; in btrfs_set_disk_extent_flags()
2987 extent_op->update_flags = true; in btrfs_set_disk_extent_flags()
2988 extent_op->update_key = false; in btrfs_set_disk_extent_flags()
2989 extent_op->is_data = is_data ? true : false; in btrfs_set_disk_extent_flags()
2990 extent_op->level = level; in btrfs_set_disk_extent_flags()
2993 num_bytes, extent_op); in btrfs_set_disk_extent_flags()
2995 btrfs_free_delayed_extent_op(extent_op); in btrfs_set_disk_extent_flags()
6685 struct btrfs_delayed_extent_op *extent_op) in __btrfs_free_extent() argument
6847 if (extent_op) in __btrfs_free_extent()
6848 __run_delayed_extent_op(extent_op, leaf, ei); in __btrfs_free_extent()
6941 if (head->extent_op) { in check_ref_cleanup()
6944 btrfs_free_delayed_extent_op(head->extent_op); in check_ref_cleanup()
6945 head->extent_op = NULL; in check_ref_cleanup()
6974 BUG_ON(head->extent_op); in check_ref_cleanup()
7970 struct btrfs_delayed_extent_op *extent_op) in alloc_reserved_tree_block() argument
7983 u64 flags = extent_op->flags_to_set; in alloc_reserved_tree_block()
8024 btrfs_set_tree_block_key(leaf, block_info, &extent_op->key); in alloc_reserved_tree_block()
8264 struct btrfs_delayed_extent_op *extent_op; in btrfs_alloc_tree_block() local
8304 extent_op = btrfs_alloc_delayed_extent_op(); in btrfs_alloc_tree_block()
8305 if (!extent_op) { in btrfs_alloc_tree_block()
8310 memcpy(&extent_op->key, key, sizeof(extent_op->key)); in btrfs_alloc_tree_block()
8312 memset(&extent_op->key, 0, sizeof(extent_op->key)); in btrfs_alloc_tree_block()
8313 extent_op->flags_to_set = flags; in btrfs_alloc_tree_block()
8314 extent_op->update_key = skinny_metadata ? false : true; in btrfs_alloc_tree_block()
8315 extent_op->update_flags = true; in btrfs_alloc_tree_block()
8316 extent_op->is_data = false; in btrfs_alloc_tree_block()
8317 extent_op->level = level; in btrfs_alloc_tree_block()
8326 extent_op, NULL, NULL); in btrfs_alloc_tree_block()
8333 btrfs_free_delayed_extent_op(extent_op); in btrfs_alloc_tree_block()