Lines Matching defs:trans
55 static int btrfs_destroy_delayed_refs(struct btrfs_transaction *trans,
1128 struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans,
1131 struct btrfs_fs_info *fs_info = trans->fs_info;
1153 leaf = btrfs_alloc_tree_block(trans, root, 0, objectid, NULL, 0, 0, 0,
1170 btrfs_set_root_generation(&root->root_item, trans->transid);
1185 ret = btrfs_insert_root(trans, tree_root, &key, &root->root_item);
1201 static struct btrfs_root *alloc_log_tree(struct btrfs_trans_handle *trans,
1225 leaf = btrfs_alloc_tree_block(trans, root, 0, BTRFS_TREE_LOG_OBJECTID,
1239 int btrfs_init_log_root_tree(struct btrfs_trans_handle *trans,
1244 log_root = alloc_log_tree(trans, fs_info);
1252 int btrfs_add_log_tree(struct btrfs_trans_handle *trans,
1259 log_root = alloc_log_tree(trans, fs_info);
1263 log_root->last_trans = trans->transid;
1792 struct btrfs_trans_handle *trans;
1823 trans = btrfs_attach_transaction(root);
1824 if (IS_ERR(trans)) {
1825 if (PTR_ERR(trans) != -ENOENT)
1829 if (transid == trans->transid) {
1830 btrfs_commit_transaction(trans);
1832 btrfs_end_transaction(trans);
4082 struct btrfs_trans_handle *trans;
4093 trans = btrfs_join_transaction(root);
4094 if (IS_ERR(trans))
4095 return PTR_ERR(trans);
4096 return btrfs_commit_transaction(trans);
4441 static int btrfs_destroy_delayed_refs(struct btrfs_transaction *trans,
4449 delayed_refs = &trans->delayed_refs;
4517 btrfs_qgroup_destroy_extent_records(trans);
4771 * We wait for 0 num_writers since we don't hold a trans