Lines Matching refs:extent_op
48 static void __run_delayed_extent_op(struct btrfs_delayed_extent_op *extent_op,
57 struct btrfs_delayed_extent_op *extent_op);
221 if (head->extent_op && head->extent_op->update_flags) in btrfs_lookup_extent_info()
222 extent_flags |= head->extent_op->flags_to_set; in btrfs_lookup_extent_info()
987 struct btrfs_delayed_extent_op *extent_op) in setup_inline_extent_backref() argument
1011 if (extent_op) in setup_inline_extent_backref()
1012 __run_delayed_extent_op(extent_op, leaf, ei); in setup_inline_extent_backref()
1076 struct btrfs_delayed_extent_op *extent_op, in update_inline_extent_backref() argument
1095 if (extent_op) in update_inline_extent_backref()
1096 __run_delayed_extent_op(extent_op, leaf, ei); in update_inline_extent_backref()
1145 struct btrfs_delayed_extent_op *extent_op) in insert_inline_extent_backref() argument
1171 extent_op, NULL); in insert_inline_extent_backref()
1175 refs_to_add, extent_op); in insert_inline_extent_backref()
1458 struct btrfs_delayed_extent_op *extent_op) in __btrfs_inc_extent_ref() argument
1476 offset, refs_to_add, extent_op); in __btrfs_inc_extent_ref()
1490 if (extent_op) in __btrfs_inc_extent_ref()
1491 __run_delayed_extent_op(extent_op, leaf, item); in __btrfs_inc_extent_ref()
1515 struct btrfs_delayed_extent_op *extent_op, in run_delayed_data_ref() argument
1537 if (extent_op) in run_delayed_data_ref()
1538 flags |= extent_op->flags_to_set; in run_delayed_data_ref()
1546 node->ref_mod, extent_op); in run_delayed_data_ref()
1551 extent_op); in run_delayed_data_ref()
1558 static void __run_delayed_extent_op(struct btrfs_delayed_extent_op *extent_op, in __run_delayed_extent_op() argument
1563 if (extent_op->update_flags) { in __run_delayed_extent_op()
1564 flags |= extent_op->flags_to_set; in __run_delayed_extent_op()
1568 if (extent_op->update_key) { in __run_delayed_extent_op()
1572 btrfs_set_tree_block_key(leaf, bi, &extent_op->key); in __run_delayed_extent_op()
1578 struct btrfs_delayed_extent_op *extent_op) in run_delayed_extent_op() argument
1588 int metadata = !extent_op->is_data; in run_delayed_extent_op()
1604 key.offset = extent_op->level; in run_delayed_extent_op()
1653 __run_delayed_extent_op(extent_op, leaf, ei); in run_delayed_extent_op()
1663 struct btrfs_delayed_extent_op *extent_op, in run_delayed_tree_ref() argument
1686 BUG_ON(!extent_op || !extent_op->update_flags); in run_delayed_tree_ref()
1687 ret = alloc_reserved_tree_block(trans, node, extent_op); in run_delayed_tree_ref()
1690 ref->level, 0, 1, extent_op); in run_delayed_tree_ref()
1693 ref->level, 0, 1, extent_op); in run_delayed_tree_ref()
1703 struct btrfs_delayed_extent_op *extent_op, in run_one_delayed_ref() argument
1716 ret = run_delayed_tree_ref(trans, node, extent_op, in run_one_delayed_ref()
1720 ret = run_delayed_data_ref(trans, node, extent_op, in run_one_delayed_ref()
1771 struct btrfs_delayed_extent_op *extent_op = head->extent_op; in cleanup_extent_op() local
1773 if (!extent_op) in cleanup_extent_op()
1777 head->extent_op = NULL; in cleanup_extent_op()
1778 btrfs_free_delayed_extent_op(extent_op); in cleanup_extent_op()
1781 return extent_op; in cleanup_extent_op()
1787 struct btrfs_delayed_extent_op *extent_op; in run_and_cleanup_extent_op() local
1790 extent_op = cleanup_extent_op(head); in run_and_cleanup_extent_op()
1791 if (!extent_op) in run_and_cleanup_extent_op()
1793 head->extent_op = NULL; in run_and_cleanup_extent_op()
1795 ret = run_delayed_extent_op(trans, head, extent_op); in run_and_cleanup_extent_op()
1796 btrfs_free_delayed_extent_op(extent_op); in run_and_cleanup_extent_op()
1846 if (!RB_EMPTY_ROOT(&head->ref_tree.rb_root) || head->extent_op) { in cleanup_ref_head()
1910 struct btrfs_delayed_extent_op *extent_op; in btrfs_run_delayed_refs_for_head() local
1958 extent_op = locked_ref->extent_op; in btrfs_run_delayed_refs_for_head()
1959 locked_ref->extent_op = NULL; in btrfs_run_delayed_refs_for_head()
1962 ret = run_one_delayed_ref(trans, ref, extent_op, in btrfs_run_delayed_refs_for_head()
1965 btrfs_free_delayed_extent_op(extent_op); in btrfs_run_delayed_refs_for_head()
2192 struct btrfs_delayed_extent_op *extent_op; in btrfs_set_disk_extent_flags() local
2195 extent_op = btrfs_alloc_delayed_extent_op(); in btrfs_set_disk_extent_flags()
2196 if (!extent_op) in btrfs_set_disk_extent_flags()
2199 extent_op->flags_to_set = flags; in btrfs_set_disk_extent_flags()
2200 extent_op->update_flags = true; in btrfs_set_disk_extent_flags()
2201 extent_op->update_key = false; in btrfs_set_disk_extent_flags()
2202 extent_op->is_data = is_data ? true : false; in btrfs_set_disk_extent_flags()
2203 extent_op->level = level; in btrfs_set_disk_extent_flags()
2205 ret = btrfs_add_delayed_extent_op(trans, eb->start, eb->len, extent_op); in btrfs_set_disk_extent_flags()
2207 btrfs_free_delayed_extent_op(extent_op); in btrfs_set_disk_extent_flags()
2919 struct btrfs_delayed_extent_op *extent_op) in __btrfs_free_extent() argument
3108 if (extent_op) in __btrfs_free_extent()
3109 __run_delayed_extent_op(extent_op, leaf, ei); in __btrfs_free_extent()
3262 BUG_ON(head->extent_op); in check_ref_cleanup()
4626 struct btrfs_delayed_extent_op *extent_op) in alloc_reserved_tree_block() argument
4639 u64 flags = extent_op->flags_to_set; in alloc_reserved_tree_block()
4679 btrfs_set_tree_block_key(leaf, block_info, &extent_op->key); in alloc_reserved_tree_block()
4880 struct btrfs_delayed_extent_op *extent_op; in btrfs_alloc_tree_block() local
4921 extent_op = btrfs_alloc_delayed_extent_op(); in btrfs_alloc_tree_block()
4922 if (!extent_op) { in btrfs_alloc_tree_block()
4927 memcpy(&extent_op->key, key, sizeof(extent_op->key)); in btrfs_alloc_tree_block()
4929 memset(&extent_op->key, 0, sizeof(extent_op->key)); in btrfs_alloc_tree_block()
4930 extent_op->flags_to_set = flags; in btrfs_alloc_tree_block()
4931 extent_op->update_key = skinny_metadata ? false : true; in btrfs_alloc_tree_block()
4932 extent_op->update_flags = true; in btrfs_alloc_tree_block()
4933 extent_op->is_data = false; in btrfs_alloc_tree_block()
4934 extent_op->level = level; in btrfs_alloc_tree_block()
4942 ret = btrfs_add_delayed_tree_ref(trans, &generic_ref, extent_op); in btrfs_alloc_tree_block()
4949 btrfs_free_delayed_extent_op(extent_op); in btrfs_alloc_tree_block()