Lines Matching refs:state
91 while (!RB_EMPTY_ROOT(&tree->state)) { in clear_btree_io_tree()
93 struct extent_state *state; in clear_btree_io_tree() local
95 node = rb_first(&tree->state); in clear_btree_io_tree()
96 state = rb_entry(node, struct extent_state, rb_node); in clear_btree_io_tree()
97 rb_erase(&state->rb_node, &tree->state); in clear_btree_io_tree()
98 RB_CLEAR_NODE(&state->rb_node); in clear_btree_io_tree()
103 ASSERT(!waitqueue_active(&state->wq)); in clear_btree_io_tree()
104 free_extent_state(state); in clear_btree_io_tree()
188 if (btrfs_blocked_trans_types[cur_trans->state] & type) { in join_transaction()
236 cur_trans->state = TRANS_STATE_RUNNING; in join_transaction()
299 if (test_bit(BTRFS_ROOT_REF_COWS, &root->state) && in record_root_in_trans()
309 set_bit(BTRFS_ROOT_IN_TRANS_SETUP, &root->state); in record_root_in_trans()
348 clear_bit(BTRFS_ROOT_IN_TRANS_SETUP, &root->state); in record_root_in_trans()
375 if (!test_bit(BTRFS_ROOT_REF_COWS, &root->state)) in btrfs_record_root_in_trans()
384 !test_bit(BTRFS_ROOT_IN_TRANS_SETUP, &root->state)) in btrfs_record_root_in_trans()
396 return (trans->state >= TRANS_STATE_BLOCKED && in is_transaction_blocked()
397 trans->state < TRANS_STATE_UNBLOCKED && in is_transaction_blocked()
416 cur_trans->state >= TRANS_STATE_UNBLOCKED || in wait_current_trans()
442 !test_bit(BTRFS_ROOT_REF_COWS, &root->state) || in need_reserve_reloc_root()
553 if (cur_trans->state >= TRANS_STATE_BLOCKED && in start_transaction()
691 wait_event(commit->commit_wait, commit->state == TRANS_STATE_COMPLETED); in wait_for_commit()
733 if (t->state >= TRANS_STATE_COMMIT_START) { in btrfs_wait_for_commit()
734 if (t->state == TRANS_STATE_COMPLETED) in btrfs_wait_for_commit()
776 if (cur_trans->state >= TRANS_STATE_BLOCKED || in btrfs_should_end_transaction()
838 ACCESS_ONCE(cur_trans->state) == TRANS_STATE_RUNNING) { in __btrfs_end_transaction()
840 if (cur_trans->state == TRANS_STATE_RUNNING) in __btrfs_end_transaction()
841 cur_trans->state = TRANS_STATE_BLOCKED; in __btrfs_end_transaction()
845 if (lock && ACCESS_ONCE(cur_trans->state) == TRANS_STATE_BLOCKED) { in __btrfs_end_transaction()
1150 clear_bit(BTRFS_ROOT_DIRTY, &root->state); in commit_cowonly_roots()
1229 clear_bit(BTRFS_ROOT_FORCE_COW, &root->state); in commit_fs_roots()
1262 if (test_and_set_bit(BTRFS_ROOT_DEFRAG_RUNNING, &root->state)) in btrfs_defrag_root()
1287 clear_bit(BTRFS_ROOT_DEFRAG_RUNNING, &root->state); in btrfs_defrag_root()
1453 set_bit(BTRFS_ROOT_FORCE_COW, &root->state); in create_pending_snapshot()
1621 ret = (trans->state >= TRANS_STATE_COMMIT_START); in btrfs_transaction_in_commit()
1647 trans->state >= TRANS_STATE_COMMIT_START || in wait_current_trans_commit_start()
1659 trans->state >= TRANS_STATE_UNBLOCKED || in wait_current_trans_commit_start_and_unblock()
1761 cur_trans->state = TRANS_STATE_COMMIT_DOING; in cleanup_transaction()
1895 if (cur_trans->state >= TRANS_STATE_COMMIT_START) { in btrfs_commit_transaction()
1910 cur_trans->state = TRANS_STATE_COMMIT_START; in btrfs_commit_transaction()
1916 if (prev_trans->state != TRANS_STATE_COMPLETED) { in btrfs_commit_transaction()
1962 cur_trans->state = TRANS_STATE_COMMIT_DOING; in btrfs_commit_transaction()
2124 cur_trans->state = TRANS_STATE_UNBLOCKED; in btrfs_commit_transaction()
2161 cur_trans->state = TRANS_STATE_COMPLETED; in btrfs_commit_transaction()