Lines Matching defs:trans

836 struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans,
839 struct btrfs_fs_info *fs_info = trans->fs_info;
861 leaf = btrfs_alloc_tree_block(trans, root, 0, objectid, NULL, 0, 0, 0,
870 btrfs_mark_buffer_dirty(trans, leaf);
878 btrfs_set_root_generation(&root->root_item, trans->transid);
895 ret = btrfs_insert_root(trans, tree_root, &key, &root->root_item);
907 static struct btrfs_root *alloc_log_tree(struct btrfs_trans_handle *trans,
923 int btrfs_alloc_log_tree_node(struct btrfs_trans_handle *trans,
938 leaf = btrfs_alloc_tree_block(trans, root, 0, BTRFS_TREE_LOG_OBJECTID,
945 btrfs_mark_buffer_dirty(trans, root->node);
951 int btrfs_init_log_root_tree(struct btrfs_trans_handle *trans,
956 log_root = alloc_log_tree(trans, fs_info);
961 int ret = btrfs_alloc_log_tree_node(trans, log_root);
974 int btrfs_add_log_tree(struct btrfs_trans_handle *trans,
982 log_root = alloc_log_tree(trans, fs_info);
986 ret = btrfs_alloc_log_tree_node(trans, log_root);
992 log_root->last_trans = trans->transid;
1540 struct btrfs_trans_handle *trans;
1573 trans = btrfs_attach_transaction(root);
1574 if (IS_ERR(trans)) {
1575 if (PTR_ERR(trans) != -ENOENT)
1579 if (transid == trans->transid) {
1580 btrfs_commit_transaction(trans);
1582 btrfs_end_transaction(trans);
4198 struct btrfs_trans_handle *trans;
4209 trans = btrfs_join_transaction(root);
4210 if (IS_ERR(trans))
4211 return PTR_ERR(trans);
4212 return btrfs_commit_transaction(trans);
4217 struct btrfs_transaction *trans;
4229 list_for_each_entry_safe(trans, tmp, &fs_info->trans_list, list) {
4237 while (find_first_extent_bit(&trans->dirty_pages, cur,
4244 trans->transid, dirty_bytes);
4245 btrfs_cleanup_one_transaction(trans, fs_info);
4247 if (trans == fs_info->running_transaction)
4249 list_del_init(&trans->list);
4251 btrfs_put_transaction(trans);
4436 void btrfs_mark_buffer_dirty(struct btrfs_trans_handle *trans,
4452 ASSERT(trans->transid == fs_info->generation);
4457 btrfs_abort_transaction(trans, -EUCLEAN);
4593 static void btrfs_destroy_delayed_refs(struct btrfs_transaction *trans,
4600 delayed_refs = &trans->delayed_refs;
4664 btrfs_qgroup_destroy_extent_records(trans);
4930 * We wait for 0 num_writers since we don't hold a trans