Home
last modified time | relevance | path

Searched refs:delayed_refs (Results 1 – 10 of 10) sorted by relevance

/linux-6.6.21/fs/btrfs/
Ddelayed-ref.c404 int btrfs_delayed_ref_lock(struct btrfs_delayed_ref_root *delayed_refs, in btrfs_delayed_ref_lock() argument
407 lockdep_assert_held(&delayed_refs->lock); in btrfs_delayed_ref_lock()
412 spin_unlock(&delayed_refs->lock); in btrfs_delayed_ref_lock()
415 spin_lock(&delayed_refs->lock); in btrfs_delayed_ref_lock()
425 static inline void drop_delayed_ref(struct btrfs_delayed_ref_root *delayed_refs, in drop_delayed_ref() argument
435 atomic_dec(&delayed_refs->num_entries); in drop_delayed_ref()
438 static bool merge_ref(struct btrfs_delayed_ref_root *delayed_refs, in merge_ref() argument
467 drop_delayed_ref(delayed_refs, head, next); in merge_ref()
470 drop_delayed_ref(delayed_refs, head, ref); in merge_ref()
485 struct btrfs_delayed_ref_root *delayed_refs, in btrfs_merge_delayed_refs() argument
[all …]
Dtransaction.h92 struct btrfs_delayed_ref_root delayed_refs; member
190 struct btrfs_delayed_ref_root *delayed_refs; in btrfs_set_skip_qgroup() local
192 delayed_refs = &trans->transaction->delayed_refs; in btrfs_set_skip_qgroup()
193 WARN_ON(delayed_refs->qgroup_to_skip); in btrfs_set_skip_qgroup()
194 delayed_refs->qgroup_to_skip = qgroupid; in btrfs_set_skip_qgroup()
199 struct btrfs_delayed_ref_root *delayed_refs; in btrfs_clear_skip_qgroup() local
201 delayed_refs = &trans->transaction->delayed_refs; in btrfs_clear_skip_qgroup()
202 WARN_ON(!delayed_refs->qgroup_to_skip); in btrfs_clear_skip_qgroup()
203 delayed_refs->qgroup_to_skip = 0; in btrfs_clear_skip_qgroup()
Ddelayed-ref.h385 struct btrfs_delayed_ref_root *delayed_refs,
389 btrfs_find_delayed_ref_head(struct btrfs_delayed_ref_root *delayed_refs,
391 int btrfs_delayed_ref_lock(struct btrfs_delayed_ref_root *delayed_refs,
397 void btrfs_delete_ref_head(struct btrfs_delayed_ref_root *delayed_refs,
401 struct btrfs_delayed_ref_root *delayed_refs);
Dextent-tree.c107 struct btrfs_delayed_ref_root *delayed_refs; in btrfs_lookup_extent_info() local
191 delayed_refs = &trans->transaction->delayed_refs; in btrfs_lookup_extent_info()
192 spin_lock(&delayed_refs->lock); in btrfs_lookup_extent_info()
193 head = btrfs_find_delayed_ref_head(delayed_refs, bytenr); in btrfs_lookup_extent_info()
197 spin_unlock(&delayed_refs->lock); in btrfs_lookup_extent_info()
220 spin_unlock(&delayed_refs->lock); in btrfs_lookup_extent_info()
1789 static void unselect_delayed_ref_head(struct btrfs_delayed_ref_root *delayed_refs, in unselect_delayed_ref_head() argument
1792 spin_lock(&delayed_refs->lock); in unselect_delayed_ref_head()
1794 delayed_refs->num_heads_ready++; in unselect_delayed_ref_head()
1795 spin_unlock(&delayed_refs->lock); in unselect_delayed_ref_head()
[all …]
Dtransaction.c147 &transaction->delayed_refs.href_root.rb_root)); in btrfs_put_transaction()
149 &transaction->delayed_refs.dirty_extent_root)); in btrfs_put_transaction()
150 if (transaction->delayed_refs.pending_csums) in btrfs_put_transaction()
153 transaction->delayed_refs.pending_csums); in btrfs_put_transaction()
353 memset(&cur_trans->delayed_refs, 0, sizeof(cur_trans->delayed_refs)); in join_transaction()
355 cur_trans->delayed_refs.href_root = RB_ROOT_CACHED; in join_transaction()
356 cur_trans->delayed_refs.dirty_extent_root = RB_ROOT; in join_transaction()
357 atomic_set(&cur_trans->delayed_refs.num_entries, 0); in join_transaction()
370 spin_lock_init(&cur_trans->delayed_refs.lock); in join_transaction()
976 test_bit(BTRFS_DELAYED_REFS_FLUSHING, &cur_trans->delayed_refs.flags)) in btrfs_should_end_transaction()
[all …]
Dqgroup.c1808 struct btrfs_delayed_ref_root *delayed_refs, in btrfs_qgroup_trace_extent_nolock() argument
1811 struct rb_node **p = &delayed_refs->dirty_extent_root.rb_node; in btrfs_qgroup_trace_extent_nolock()
1816 lockdep_assert_held(&delayed_refs->lock); in btrfs_qgroup_trace_extent_nolock()
1838 rb_insert_color(&record->node, &delayed_refs->dirty_extent_root); in btrfs_qgroup_trace_extent_nolock()
1900 struct btrfs_delayed_ref_root *delayed_refs; in btrfs_qgroup_trace_extent() local
1910 delayed_refs = &trans->transaction->delayed_refs; in btrfs_qgroup_trace_extent()
1915 spin_lock(&delayed_refs->lock); in btrfs_qgroup_trace_extent()
1916 ret = btrfs_qgroup_trace_extent_nolock(fs_info, delayed_refs, record); in btrfs_qgroup_trace_extent()
1917 spin_unlock(&delayed_refs->lock); in btrfs_qgroup_trace_extent()
2790 struct btrfs_delayed_ref_root *delayed_refs; in btrfs_qgroup_account_extents() local
[all …]
Dextent-tree.h96 struct btrfs_delayed_ref_root *delayed_refs,
Ddisk-io.c4597 struct btrfs_delayed_ref_root *delayed_refs; in btrfs_destroy_delayed_refs() local
4600 delayed_refs = &trans->delayed_refs; in btrfs_destroy_delayed_refs()
4602 spin_lock(&delayed_refs->lock); in btrfs_destroy_delayed_refs()
4603 if (atomic_read(&delayed_refs->num_entries) == 0) { in btrfs_destroy_delayed_refs()
4604 spin_unlock(&delayed_refs->lock); in btrfs_destroy_delayed_refs()
4609 while ((node = rb_first_cached(&delayed_refs->href_root)) != NULL) { in btrfs_destroy_delayed_refs()
4616 if (btrfs_delayed_ref_lock(delayed_refs, head)) in btrfs_destroy_delayed_refs()
4627 atomic_dec(&delayed_refs->num_entries); in btrfs_destroy_delayed_refs()
4633 btrfs_delete_ref_head(delayed_refs, head); in btrfs_destroy_delayed_refs()
4635 spin_unlock(&delayed_refs->lock); in btrfs_destroy_delayed_refs()
[all …]
Dqgroup.h292 struct btrfs_delayed_ref_root *delayed_refs,
Dbackref.c1393 struct btrfs_delayed_ref_root *delayed_refs = NULL; in find_parent_nodes() local
1449 delayed_refs = &ctx->trans->transaction->delayed_refs; in find_parent_nodes()
1450 spin_lock(&delayed_refs->lock); in find_parent_nodes()
1451 head = btrfs_find_delayed_ref_head(delayed_refs, ctx->bytenr); in find_parent_nodes()
1455 spin_unlock(&delayed_refs->lock); in find_parent_nodes()
1468 spin_unlock(&delayed_refs->lock); in find_parent_nodes()
1475 spin_unlock(&delayed_refs->lock); in find_parent_nodes()