Lines Matching defs:trans

128 int btrfs_update_root(struct btrfs_trans_handle *trans, struct btrfs_root
144 ret = btrfs_search_slot(trans, root, key, path, 0, 1);
153 btrfs_abort_transaction(trans, ret);
169 ret = btrfs_search_slot(trans, root, key, path,
172 btrfs_abort_transaction(trans, ret);
176 ret = btrfs_del_item(trans, root, path);
178 btrfs_abort_transaction(trans, ret);
182 ret = btrfs_insert_empty_item(trans, root, path,
185 btrfs_abort_transaction(trans, ret);
203 int btrfs_insert_root(struct btrfs_trans_handle *trans, struct btrfs_root *root,
210 return btrfs_insert_item(trans, root, key, item, sizeof(*item));
265 struct btrfs_trans_handle *trans;
269 trans = btrfs_join_transaction(tree_root);
270 if (IS_ERR(trans)) {
271 err = PTR_ERR(trans);
273 "Failed to start trans to delete orphan item");
276 err = btrfs_del_orphan_item(trans, tree_root,
278 btrfs_end_transaction(trans);
314 int btrfs_del_root(struct btrfs_trans_handle *trans,
317 struct btrfs_root *root = trans->fs_info->tree_root;
324 ret = btrfs_search_slot(trans, root, key, path, -1, 1);
331 return 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);
369 ret = btrfs_del_item(trans, tree_root, path);
402 int btrfs_add_root_ref(struct btrfs_trans_handle *trans, u64 root_id,
406 struct btrfs_root *tree_root = trans->fs_info->tree_root;
422 ret = btrfs_insert_empty_item(trans, tree_root, path, &key,
425 btrfs_abort_transaction(trans, ret);
466 void btrfs_update_root_times(struct btrfs_trans_handle *trans,
474 btrfs_set_root_ctransid(item, trans->transid);