Lines Matching refs:trans
135 int btrfs_update_root(struct btrfs_trans_handle *trans, struct btrfs_root in btrfs_update_root() argument
150 ret = btrfs_search_slot(trans, root, key, path, 0, 1); in btrfs_update_root()
152 btrfs_abort_transaction(trans, root, ret); in btrfs_update_root()
175 ret = btrfs_search_slot(trans, root, key, path, in btrfs_update_root()
178 btrfs_abort_transaction(trans, root, ret); in btrfs_update_root()
182 ret = btrfs_del_item(trans, root, path); in btrfs_update_root()
184 btrfs_abort_transaction(trans, root, ret); in btrfs_update_root()
188 ret = btrfs_insert_empty_item(trans, root, path, in btrfs_update_root()
191 btrfs_abort_transaction(trans, root, ret); in btrfs_update_root()
212 int btrfs_insert_root(struct btrfs_trans_handle *trans, struct btrfs_root *root, in btrfs_insert_root() argument
219 return btrfs_insert_item(trans, root, key, item, sizeof(*item)); in btrfs_insert_root()
279 struct btrfs_trans_handle *trans; in btrfs_find_orphan_roots() local
283 trans = btrfs_join_transaction(tree_root); in btrfs_find_orphan_roots()
284 if (IS_ERR(trans)) { in btrfs_find_orphan_roots()
285 err = PTR_ERR(trans); in btrfs_find_orphan_roots()
291 err = btrfs_del_orphan_item(trans, tree_root, in btrfs_find_orphan_roots()
293 btrfs_end_transaction(trans, tree_root); in btrfs_find_orphan_roots()
327 int btrfs_del_root(struct btrfs_trans_handle *trans, struct btrfs_root *root, in btrfs_del_root() argument
336 ret = btrfs_search_slot(trans, root, key, path, -1, 1); in btrfs_del_root()
342 ret = btrfs_del_item(trans, root, path); in btrfs_del_root()
348 int btrfs_del_root_ref(struct btrfs_trans_handle *trans, in btrfs_del_root_ref() argument
370 ret = btrfs_search_slot(trans, tree_root, &key, path, -1, 1); in btrfs_del_root_ref()
383 ret = btrfs_del_item(trans, tree_root, path); in btrfs_del_root_ref()
419 int btrfs_add_root_ref(struct btrfs_trans_handle *trans, in btrfs_add_root_ref() argument
439 ret = btrfs_insert_empty_item(trans, tree_root, path, &key, in btrfs_add_root_ref()
442 btrfs_abort_transaction(trans, tree_root, ret); in btrfs_add_root_ref()
486 void btrfs_update_root_times(struct btrfs_trans_handle *trans, in btrfs_update_root_times() argument
493 btrfs_set_root_ctransid(item, trans->transid); in btrfs_update_root_times()