Lines Matching defs:trans
121 int btrfs_update_root(struct btrfs_trans_handle *trans, struct btrfs_root
137 ret = btrfs_search_slot(trans, root, key, path, 0, 1);
147 btrfs_abort_transaction(trans, ret);
163 ret = btrfs_search_slot(trans, root, key, path,
166 btrfs_abort_transaction(trans, ret);
170 ret = btrfs_del_item(trans, root, path);
172 btrfs_abort_transaction(trans, ret);
176 ret = btrfs_insert_empty_item(trans, root, path,
179 btrfs_abort_transaction(trans, ret);
194 btrfs_mark_buffer_dirty(trans, path->nodes[0]);
200 int btrfs_insert_root(struct btrfs_trans_handle *trans, struct btrfs_root *root,
207 return btrfs_insert_item(trans, root, key, item, sizeof(*item));
262 struct btrfs_trans_handle *trans;
266 trans = btrfs_join_transaction(tree_root);
267 if (IS_ERR(trans)) {
268 err = PTR_ERR(trans);
270 "Failed to start trans to delete orphan item");
273 err = btrfs_del_orphan_item(trans, tree_root,
275 btrfs_end_transaction(trans);
312 int btrfs_del_root(struct btrfs_trans_handle *trans,
315 struct btrfs_root *root = trans->fs_info->tree_root;
322 ret = btrfs_search_slot(trans, root, key, path, -1, 1);
328 ret = btrfs_del_item(trans, root, path);
334 int btrfs_del_root_ref(struct btrfs_trans_handle *trans, u64 root_id,
338 struct btrfs_root *tree_root = trans->fs_info->tree_root;
354 ret = btrfs_search_slot(trans, tree_root, &key, path, -1, 1);
370 ret = btrfs_del_item(trans, tree_root, path);
406 int btrfs_add_root_ref(struct btrfs_trans_handle *trans, u64 root_id,
410 struct btrfs_root *tree_root = trans->fs_info->tree_root;
426 ret = btrfs_insert_empty_item(trans, tree_root, path, &key,
429 btrfs_abort_transaction(trans, ret);
441 btrfs_mark_buffer_dirty(trans, leaf);
473 void btrfs_update_root_times(struct btrfs_trans_handle *trans,
481 btrfs_set_root_ctransid(item, trans->transid);