Lines Matching full:trans
19 int bch2_create_trans(struct btree_trans *trans, in bch2_create_trans() argument
30 struct bch_fs *c = trans->c; in bch2_create_trans()
41 ret = bch2_subvolume_get_snapshot(trans, dir.subvol, &snapshot); in bch2_create_trans()
45 ret = bch2_inode_peek(trans, &dir_iter, dir_u, dir, in bch2_create_trans()
57 ret = bch2_inode_create(trans, &inode_iter, new_inode, snapshot, cpu); in bch2_create_trans()
73 ret = bch2_subvolume_get(trans, snapshot_src.subvol, true, in bch2_create_trans()
81 ret = bch2_inode_peek(trans, &inode_iter, new_inode, snapshot_src, in bch2_create_trans()
110 ret = bch2_subvolume_create(trans, new_inode->bi_inum, in bch2_create_trans()
124 ret = bch2_subvolume_get_snapshot(trans, dir.subvol, &dir_snapshot); in bch2_create_trans()
136 ret = bch2_set_acl_trans(trans, new_inum, new_inode, in bch2_create_trans()
143 ret = bch2_set_acl_trans(trans, new_inum, new_inode, in bch2_create_trans()
158 ret = bch2_inode_write(trans, &dir_iter, dir_u); in bch2_create_trans()
162 ret = bch2_dirent_create(trans, dir, &dir_hash, in bch2_create_trans()
179 bch2_inode_write(trans, &inode_iter, new_inode); in bch2_create_trans()
181 bch2_trans_iter_exit(trans, &inode_iter); in bch2_create_trans()
182 bch2_trans_iter_exit(trans, &dir_iter); in bch2_create_trans()
186 int bch2_link_trans(struct btree_trans *trans, in bch2_link_trans() argument
191 struct bch_fs *c = trans->c; in bch2_link_trans()
202 ret = bch2_inode_peek(trans, &inode_iter, inode_u, inum, BTREE_ITER_intent); in bch2_link_trans()
211 ret = bch2_inode_peek(trans, &dir_iter, dir_u, dir, BTREE_ITER_intent); in bch2_link_trans()
224 ret = bch2_dirent_create(trans, dir, &dir_hash, in bch2_link_trans()
234 ret = bch2_inode_write(trans, &dir_iter, dir_u) ?: in bch2_link_trans()
235 bch2_inode_write(trans, &inode_iter, inode_u); in bch2_link_trans()
237 bch2_trans_iter_exit(trans, &dir_iter); in bch2_link_trans()
238 bch2_trans_iter_exit(trans, &inode_iter); in bch2_link_trans()
242 int bch2_unlink_trans(struct btree_trans *trans, in bch2_unlink_trans() argument
249 struct bch_fs *c = trans->c; in bch2_unlink_trans()
259 ret = bch2_inode_peek(trans, &dir_iter, dir_u, dir, BTREE_ITER_intent); in bch2_unlink_trans()
265 ret = bch2_dirent_lookup_trans(trans, &dirent_iter, dir, &dir_hash, in bch2_unlink_trans()
270 ret = bch2_inode_peek(trans, &inode_iter, inode_u, inum, in bch2_unlink_trans()
276 ret = bch2_empty_dir_trans(trans, inum); in bch2_unlink_trans()
288 ret = bch2_subvol_has_children(trans, inode_u->bi_subvol); in bch2_unlink_trans()
294 ret = bch2_subvolume_unlink(trans, inode_u->bi_subvol); in bch2_unlink_trans()
312 bch2_inode_nlink_dec(trans, inode_u); in bch2_unlink_trans()
324 ret = bch2_hash_delete_at(trans, bch2_dirent_hash_desc, in bch2_unlink_trans()
327 bch2_inode_write(trans, &dir_iter, dir_u) ?: in bch2_unlink_trans()
328 bch2_inode_write(trans, &inode_iter, inode_u); in bch2_unlink_trans()
330 bch2_trans_iter_exit(trans, &inode_iter); in bch2_unlink_trans()
331 bch2_trans_iter_exit(trans, &dirent_iter); in bch2_unlink_trans()
332 bch2_trans_iter_exit(trans, &dir_iter); in bch2_unlink_trans()
361 static int subvol_update_parent(struct btree_trans *trans, u32 subvol, u32 new_parent) in subvol_update_parent() argument
365 bch2_bkey_get_mut_typed(trans, &iter, in subvol_update_parent()
373 bch2_trans_iter_exit(trans, &iter); in subvol_update_parent()
377 int bch2_rename_trans(struct btree_trans *trans, in bch2_rename_trans() argument
386 struct bch_fs *c = trans->c; in bch2_rename_trans()
397 ret = bch2_inode_peek(trans, &src_dir_iter, src_dir_u, src_dir, in bch2_rename_trans()
406 ret = bch2_inode_peek(trans, &dst_dir_iter, dst_dir_u, dst_dir, in bch2_rename_trans()
417 ret = bch2_dirent_rename(trans, in bch2_rename_trans()
426 ret = bch2_inode_peek(trans, &src_inode_iter, src_inode_u, src_inum, in bch2_rename_trans()
432 ret = bch2_inode_peek(trans, &dst_inode_iter, dst_inode_u, dst_inum, in bch2_rename_trans()
440 ret = subvol_update_parent(trans, src_inode_u->bi_subvol, dst_dir.subvol); in bch2_rename_trans()
448 ret = subvol_update_parent(trans, dst_inode_u->bi_subvol, src_dir.subvol); in bch2_rename_trans()
491 ret = bch2_empty_dir_trans(trans, dst_inum); in bch2_rename_trans()
521 bch2_inode_nlink_dec(trans, dst_inode_u); in bch2_rename_trans()
536 ret = bch2_inode_write(trans, &src_dir_iter, src_dir_u) ?: in bch2_rename_trans()
538 ? bch2_inode_write(trans, &dst_dir_iter, dst_dir_u) in bch2_rename_trans()
540 bch2_inode_write(trans, &src_inode_iter, src_inode_u) ?: in bch2_rename_trans()
542 ? bch2_inode_write(trans, &dst_inode_iter, dst_inode_u) in bch2_rename_trans()
545 bch2_trans_iter_exit(trans, &dst_inode_iter); in bch2_rename_trans()
546 bch2_trans_iter_exit(trans, &src_inode_iter); in bch2_rename_trans()
547 bch2_trans_iter_exit(trans, &dst_dir_iter); in bch2_rename_trans()
548 bch2_trans_iter_exit(trans, &src_dir_iter); in bch2_rename_trans()