Home
last modified time | relevance | path

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

/Linux-v6.6/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.h89 struct btrfs_delayed_ref_root delayed_refs; member
187 struct btrfs_delayed_ref_root *delayed_refs; in btrfs_set_skip_qgroup() local
189 delayed_refs = &trans->transaction->delayed_refs; in btrfs_set_skip_qgroup()
190 WARN_ON(delayed_refs->qgroup_to_skip); in btrfs_set_skip_qgroup()
191 delayed_refs->qgroup_to_skip = qgroupid; in btrfs_set_skip_qgroup()
196 struct btrfs_delayed_ref_root *delayed_refs; in btrfs_clear_skip_qgroup() local
198 delayed_refs = &trans->transaction->delayed_refs; in btrfs_clear_skip_qgroup()
199 WARN_ON(!delayed_refs->qgroup_to_skip); in btrfs_clear_skip_qgroup()
200 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()
1784 static void unselect_delayed_ref_head(struct btrfs_delayed_ref_root *delayed_refs, in unselect_delayed_ref_head() argument
1787 spin_lock(&delayed_refs->lock); in unselect_delayed_ref_head()
1789 delayed_refs->num_heads_ready++; in unselect_delayed_ref_head()
1790 spin_unlock(&delayed_refs->lock); in unselect_delayed_ref_head()
[all …]
Dtransaction.c149 &transaction->delayed_refs.href_root.rb_root)); in btrfs_put_transaction()
151 &transaction->delayed_refs.dirty_extent_root)); in btrfs_put_transaction()
152 if (transaction->delayed_refs.pending_csums) in btrfs_put_transaction()
155 transaction->delayed_refs.pending_csums); in btrfs_put_transaction()
355 memset(&cur_trans->delayed_refs, 0, sizeof(cur_trans->delayed_refs)); in join_transaction()
357 cur_trans->delayed_refs.href_root = RB_ROOT_CACHED; in join_transaction()
358 cur_trans->delayed_refs.dirty_extent_root = RB_ROOT; in join_transaction()
359 atomic_set(&cur_trans->delayed_refs.num_entries, 0); in join_transaction()
372 spin_lock_init(&cur_trans->delayed_refs.lock); in join_transaction()
978 test_bit(BTRFS_DELAYED_REFS_FLUSHING, &cur_trans->delayed_refs.flags)) in btrfs_should_end_transaction()
[all …]
Dqgroup.c1775 struct btrfs_delayed_ref_root *delayed_refs, in btrfs_qgroup_trace_extent_nolock() argument
1778 struct rb_node **p = &delayed_refs->dirty_extent_root.rb_node; in btrfs_qgroup_trace_extent_nolock()
1783 lockdep_assert_held(&delayed_refs->lock); in btrfs_qgroup_trace_extent_nolock()
1805 rb_insert_color(&record->node, &delayed_refs->dirty_extent_root); in btrfs_qgroup_trace_extent_nolock()
1867 struct btrfs_delayed_ref_root *delayed_refs; in btrfs_qgroup_trace_extent() local
1877 delayed_refs = &trans->transaction->delayed_refs; in btrfs_qgroup_trace_extent()
1882 spin_lock(&delayed_refs->lock); in btrfs_qgroup_trace_extent()
1883 ret = btrfs_qgroup_trace_extent_nolock(fs_info, delayed_refs, record); in btrfs_qgroup_trace_extent()
1884 spin_unlock(&delayed_refs->lock); in btrfs_qgroup_trace_extent()
2757 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.c4582 struct btrfs_delayed_ref_root *delayed_refs; in btrfs_destroy_delayed_refs() local
4585 delayed_refs = &trans->delayed_refs; in btrfs_destroy_delayed_refs()
4587 spin_lock(&delayed_refs->lock); in btrfs_destroy_delayed_refs()
4588 if (atomic_read(&delayed_refs->num_entries) == 0) { in btrfs_destroy_delayed_refs()
4589 spin_unlock(&delayed_refs->lock); in btrfs_destroy_delayed_refs()
4594 while ((node = rb_first_cached(&delayed_refs->href_root)) != NULL) { in btrfs_destroy_delayed_refs()
4601 if (btrfs_delayed_ref_lock(delayed_refs, head)) in btrfs_destroy_delayed_refs()
4612 atomic_dec(&delayed_refs->num_entries); in btrfs_destroy_delayed_refs()
4618 btrfs_delete_ref_head(delayed_refs, head); in btrfs_destroy_delayed_refs()
4620 spin_unlock(&delayed_refs->lock); in btrfs_destroy_delayed_refs()
[all …]
Dqgroup.h283 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()