diff options
Diffstat (limited to 'fs/bcachefs')
-rw-r--r-- | fs/bcachefs/btree_iter.h | 2 | ||||
-rw-r--r-- | fs/bcachefs/btree_update.h | 50 | ||||
-rw-r--r-- | fs/bcachefs/buckets.c | 18 | ||||
-rw-r--r-- | fs/bcachefs/fsck.c | 16 | ||||
-rw-r--r-- | fs/bcachefs/namei.c | 4 | ||||
-rw-r--r-- | fs/bcachefs/snapshot.c | 91 | ||||
-rw-r--r-- | fs/bcachefs/subvolume.c | 30 |
7 files changed, 66 insertions, 145 deletions
diff --git a/fs/bcachefs/btree_iter.h b/fs/bcachefs/btree_iter.h index a7c2087bc4a1..b117cb5d7f94 100644 --- a/fs/bcachefs/btree_iter.h +++ b/fs/bcachefs/btree_iter.h @@ -673,7 +673,7 @@ static inline struct bkey_s_c __bch2_bkey_get_typed(struct btree_iter *iter, { struct bkey_s_c k = bch2_btree_iter_peek_slot(iter); - if (!bkey_err(k) && k.k->type != type) + if (!bkey_err(k) && type && k.k->type != type) k = bkey_s_c_err(bch_err_throw(iter->trans->c, ENOENT_bkey_type_mismatch)); return k; } diff --git a/fs/bcachefs/btree_update.h b/fs/bcachefs/btree_update.h index 6790e0254a63..663739db82b1 100644 --- a/fs/bcachefs/btree_update.h +++ b/fs/bcachefs/btree_update.h @@ -370,72 +370,52 @@ static inline struct bkey_i *bch2_bkey_make_mut(struct btree_trans *trans, bkey_i_to_##_type(__bch2_bkey_make_mut(_trans, _iter, _k, _flags,\ KEY_TYPE_##_type, sizeof(struct bkey_i_##_type))) -static inline struct bkey_i *__bch2_bkey_get_mut_noupdate(struct btree_trans *trans, - struct btree_iter *iter, - unsigned btree_id, struct bpos pos, - enum btree_iter_update_trigger_flags flags, +static inline struct bkey_i *__bch2_bkey_get_mut_noupdate(struct btree_iter *iter, unsigned type, unsigned min_bytes) { - struct bkey_s_c k = __bch2_bkey_get_iter(trans, iter, - btree_id, pos, flags|BTREE_ITER_intent, type); - struct bkey_i *ret = IS_ERR(k.k) + struct bkey_s_c k = __bch2_bkey_get_typed(iter, type); + return IS_ERR(k.k) ? ERR_CAST(k.k) - : __bch2_bkey_make_mut_noupdate(trans, k, 0, min_bytes); - if (IS_ERR(ret)) - bch2_trans_iter_exit(iter); - return ret; + : __bch2_bkey_make_mut_noupdate(iter->trans, k, 0, min_bytes); } -static inline struct bkey_i *bch2_bkey_get_mut_noupdate(struct btree_trans *trans, - struct btree_iter *iter, - unsigned btree_id, struct bpos pos, - enum btree_iter_update_trigger_flags flags) +static inline struct bkey_i *bch2_bkey_get_mut_noupdate(struct btree_iter *iter) { - return __bch2_bkey_get_mut_noupdate(trans, iter, btree_id, pos, flags, 0, 0); + return __bch2_bkey_get_mut_noupdate(iter, 0, 0); } static inline struct bkey_i *__bch2_bkey_get_mut(struct btree_trans *trans, - struct btree_iter *iter, - unsigned btree_id, struct bpos pos, + enum btree_id btree, struct bpos pos, enum btree_iter_update_trigger_flags flags, unsigned type, unsigned min_bytes) { - struct bkey_i *mut = __bch2_bkey_get_mut_noupdate(trans, iter, - btree_id, pos, flags|BTREE_ITER_intent, type, min_bytes); - int ret; - + CLASS(btree_iter, iter)(trans, btree, pos, flags|BTREE_ITER_intent); + struct bkey_i *mut = __bch2_bkey_get_mut_noupdate(&iter, type, min_bytes); if (IS_ERR(mut)) return mut; - - ret = bch2_trans_update(trans, iter, mut, flags); - if (ret) { - bch2_trans_iter_exit(iter); + int ret = bch2_trans_update(trans, &iter, mut, flags); + if (ret) return ERR_PTR(ret); - } - return mut; } static inline struct bkey_i *bch2_bkey_get_mut_minsize(struct btree_trans *trans, - struct btree_iter *iter, unsigned btree_id, struct bpos pos, enum btree_iter_update_trigger_flags flags, unsigned min_bytes) { - return __bch2_bkey_get_mut(trans, iter, btree_id, pos, flags, 0, min_bytes); + return __bch2_bkey_get_mut(trans, btree_id, pos, flags, 0, min_bytes); } static inline struct bkey_i *bch2_bkey_get_mut(struct btree_trans *trans, - struct btree_iter *iter, unsigned btree_id, struct bpos pos, enum btree_iter_update_trigger_flags flags) { - return __bch2_bkey_get_mut(trans, iter, btree_id, pos, flags, 0, 0); + return __bch2_bkey_get_mut(trans, btree_id, pos, flags, 0, 0); } -#define bch2_bkey_get_mut_typed(_trans, _iter, _btree_id, _pos, _flags, _type)\ - bkey_i_to_##_type(__bch2_bkey_get_mut(_trans, _iter, \ - _btree_id, _pos, _flags, \ +#define bch2_bkey_get_mut_typed(_trans, _btree_id, _pos, _flags, _type) \ + bkey_i_to_##_type(__bch2_bkey_get_mut(_trans, _btree_id, _pos, _flags, \ KEY_TYPE_##_type, sizeof(struct bkey_i_##_type))) static inline struct bkey_i *__bch2_bkey_alloc(struct btree_trans *trans, struct btree_iter *iter, diff --git a/fs/bcachefs/buckets.c b/fs/bcachefs/buckets.c index 0a357005e9e8..87a6f4dce296 100644 --- a/fs/bcachefs/buckets.c +++ b/fs/bcachefs/buckets.c @@ -663,24 +663,23 @@ static int bch2_trigger_stripe_ptr(struct btree_trans *trans, struct bch_fs *c = trans->c; if (flags & BTREE_TRIGGER_transactional) { - struct btree_iter iter; - struct bkey_i_stripe *s = bch2_bkey_get_mut_typed(trans, &iter, - BTREE_ID_stripes, POS(0, p.ec.idx), - BTREE_ITER_with_updates, stripe); + struct bkey_i_stripe *s = bch2_bkey_get_mut_typed(trans, + BTREE_ID_stripes, POS(0, p.ec.idx), + BTREE_ITER_with_updates, + stripe); int ret = PTR_ERR_OR_ZERO(s); if (unlikely(ret)) { bch2_trans_inconsistent_on(bch2_err_matches(ret, ENOENT), trans, "pointer to nonexistent stripe %llu", (u64) p.ec.idx); - goto err; + return ret; } if (!bch2_ptr_matches_stripe(&s->v, p)) { bch2_trans_inconsistent(trans, "stripe pointer doesn't match stripe %llu", (u64) p.ec.idx); - ret = bch_err_throw(c, trigger_stripe_pointer); - goto err; + return bch_err_throw(c, trigger_stripe_pointer); } stripe_blockcount_set(&s->v, p.ec.block, @@ -692,10 +691,7 @@ static int bch2_trigger_stripe_ptr(struct btree_trans *trans, acc.type = BCH_DISK_ACCOUNTING_replicas; bch2_bkey_to_replicas(&acc.replicas, bkey_i_to_s_c(&s->k_i)); acc.replicas.data_type = data_type; - ret = bch2_disk_accounting_mod(trans, &acc, §ors, 1, false); -err: - bch2_trans_iter_exit(&iter); - return ret; + return bch2_disk_accounting_mod(trans, &acc, §ors, 1, false); } if (flags & BTREE_TRIGGER_gc) { diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c index 685acadeeae7..d6fd25f1db1f 100644 --- a/fs/bcachefs/fsck.c +++ b/fs/bcachefs/fsck.c @@ -190,8 +190,7 @@ static int lookup_lostfound(struct btree_trans *trans, u32 snapshot, return ret; if (!subvol.inode) { - struct btree_iter iter; - struct bkey_i_subvolume *subvol = bch2_bkey_get_mut_typed(trans, &iter, + struct bkey_i_subvolume *subvol = bch2_bkey_get_mut_typed(trans, BTREE_ID_subvolumes, POS(0, subvolid), 0, subvolume); ret = PTR_ERR_OR_ZERO(subvol); @@ -199,7 +198,6 @@ static int lookup_lostfound(struct btree_trans *trans, u32 snapshot, return ret; subvol->v.inode = cpu_to_le64(reattaching_inum); - bch2_trans_iter_exit(&iter); } subvol_inum root_inum = { @@ -369,9 +367,8 @@ static int reattach_inode(struct btree_trans *trans, struct bch_inode_unpacked * if (inode->bi_subvol) { inode->bi_parent_subvol = BCACHEFS_ROOT_SUBVOL; - struct btree_iter subvol_iter; struct bkey_i_subvolume *subvol = - bch2_bkey_get_mut_typed(trans, &subvol_iter, + bch2_bkey_get_mut_typed(trans, BTREE_ID_subvolumes, POS(0, inode->bi_subvol), 0, subvolume); ret = PTR_ERR_OR_ZERO(subvol); @@ -379,7 +376,6 @@ static int reattach_inode(struct btree_trans *trans, struct bch_inode_unpacked * return ret; subvol->v.fs_path_parent = BCACHEFS_ROOT_SUBVOL; - bch2_trans_iter_exit(&subvol_iter); u64 root_inum; ret = subvol_lookup(trans, inode->bi_parent_subvol, @@ -602,8 +598,7 @@ static int reconstruct_subvol(struct btree_trans *trans, u32 snapshotid, u32 sub if (ret) return ret; - struct btree_iter iter; - struct bkey_i_snapshot *s = bch2_bkey_get_mut_typed(trans, &iter, + struct bkey_i_snapshot *s = bch2_bkey_get_mut_typed(trans, BTREE_ID_snapshots, POS(0, snapshotid), 0, snapshot); ret = PTR_ERR_OR_ZERO(s); @@ -615,9 +610,8 @@ static int reconstruct_subvol(struct btree_trans *trans, u32 snapshotid, u32 sub s->v.subvol = cpu_to_le32(subvolid); SET_BCH_SNAPSHOT_SUBVOL(&s->v, true); - bch2_trans_iter_exit(&iter); - struct bkey_i_snapshot_tree *st = bch2_bkey_get_mut_typed(trans, &iter, + struct bkey_i_snapshot_tree *st = bch2_bkey_get_mut_typed(trans, BTREE_ID_snapshot_trees, POS(0, snapshot_tree), 0, snapshot_tree); ret = PTR_ERR_OR_ZERO(st); @@ -627,8 +621,6 @@ static int reconstruct_subvol(struct btree_trans *trans, u32 snapshotid, u32 sub if (!st->v.master_subvol) st->v.master_subvol = cpu_to_le32(subvolid); - - bch2_trans_iter_exit(&iter); return 0; } diff --git a/fs/bcachefs/namei.c b/fs/bcachefs/namei.c index 5cb12db311e3..da758c2767ea 100644 --- a/fs/bcachefs/namei.c +++ b/fs/bcachefs/namei.c @@ -383,9 +383,8 @@ bool bch2_reinherit_attrs(struct bch_inode_unpacked *dst_u, static int subvol_update_parent(struct btree_trans *trans, u32 subvol, u32 new_parent) { - struct btree_iter iter; struct bkey_i_subvolume *s = - bch2_bkey_get_mut_typed(trans, &iter, + bch2_bkey_get_mut_typed(trans, BTREE_ID_subvolumes, POS(0, subvol), BTREE_ITER_cached, subvolume); int ret = PTR_ERR_OR_ZERO(s); @@ -393,7 +392,6 @@ static int subvol_update_parent(struct btree_trans *trans, u32 subvol, u32 new_p return ret; s->v.fs_path_parent = cpu_to_le32(new_parent); - bch2_trans_iter_exit(&iter); return 0; } diff --git a/fs/bcachefs/snapshot.c b/fs/bcachefs/snapshot.c index 56de79998712..5a1f81749661 100644 --- a/fs/bcachefs/snapshot.c +++ b/fs/bcachefs/snapshot.c @@ -452,17 +452,14 @@ static int bch2_snapshot_tree_master_subvol(struct btree_trans *trans, *subvol_id = bch2_snapshot_oldest_subvol(c, snapshot_root, NULL); - struct btree_iter iter; struct bkey_i_subvolume *u = - bch2_bkey_get_mut_typed(trans, &iter, - BTREE_ID_subvolumes, POS(0, *subvol_id), + bch2_bkey_get_mut_typed(trans, BTREE_ID_subvolumes, POS(0, *subvol_id), 0, subvolume); ret = PTR_ERR_OR_ZERO(u); if (ret) return ret; SET_BCH_SUBVOLUME_SNAP(&u->v, false); - bch2_trans_iter_exit(&iter); return 0; } @@ -1087,28 +1084,21 @@ int __bch2_get_snapshot_overwrites(struct btree_trans *trans, */ int bch2_snapshot_node_set_deleted(struct btree_trans *trans, u32 id) { - struct btree_iter iter; struct bkey_i_snapshot *s = - bch2_bkey_get_mut_typed(trans, &iter, - BTREE_ID_snapshots, POS(0, id), - 0, snapshot); + bch2_bkey_get_mut_typed(trans, BTREE_ID_snapshots, POS(0, id), 0, snapshot); int ret = PTR_ERR_OR_ZERO(s); - if (unlikely(ret)) { - bch2_fs_inconsistent_on(bch2_err_matches(ret, ENOENT), - trans->c, "missing snapshot %u", id); + bch2_fs_inconsistent_on(bch2_err_matches(ret, ENOENT), trans->c, "missing snapshot %u", id); + if (unlikely(ret)) return ret; - } /* already deleted? */ if (BCH_SNAPSHOT_WILL_DELETE(&s->v)) - goto err; + return 0; SET_BCH_SNAPSHOT_WILL_DELETE(&s->v, true); SET_BCH_SNAPSHOT_SUBVOL(&s->v, false); s->v.subvol = 0; -err: - bch2_trans_iter_exit(&iter); - return ret; + return 0; } static inline void normalize_snapshot_child_pointers(struct bch_snapshot *s) @@ -1120,22 +1110,17 @@ static inline void normalize_snapshot_child_pointers(struct bch_snapshot *s) static int bch2_snapshot_node_delete(struct btree_trans *trans, u32 id) { struct bch_fs *c = trans->c; - struct btree_iter iter, p_iter = {}; - struct btree_iter c_iter = {}; - struct btree_iter tree_iter = {}; u32 parent_id, child_id; unsigned i; - int ret = 0; struct bkey_i_snapshot *s = - bch2_bkey_get_mut_typed(trans, &iter, BTREE_ID_snapshots, POS(0, id), - BTREE_ITER_intent, snapshot); - ret = PTR_ERR_OR_ZERO(s); + bch2_bkey_get_mut_typed(trans, BTREE_ID_snapshots, POS(0, id), 0, snapshot); + int ret = PTR_ERR_OR_ZERO(s); bch2_fs_inconsistent_on(bch2_err_matches(ret, ENOENT), c, "missing snapshot %u", id); if (ret) - goto err; + return ret; BUG_ON(BCH_SNAPSHOT_DELETED(&s->v)); BUG_ON(s->v.children[1]); @@ -1144,16 +1129,14 @@ static int bch2_snapshot_node_delete(struct btree_trans *trans, u32 id) child_id = le32_to_cpu(s->v.children[0]); if (parent_id) { - struct bkey_i_snapshot *parent; - - parent = bch2_bkey_get_mut_typed(trans, &p_iter, - BTREE_ID_snapshots, POS(0, parent_id), - 0, snapshot); + struct bkey_i_snapshot *parent = + bch2_bkey_get_mut_typed(trans, BTREE_ID_snapshots, POS(0, parent_id), + 0, snapshot); ret = PTR_ERR_OR_ZERO(parent); bch2_fs_inconsistent_on(bch2_err_matches(ret, ENOENT), c, "missing snapshot %u", parent_id); if (unlikely(ret)) - goto err; + return ret; /* find entry in parent->children for node being deleted */ for (i = 0; i < 2; i++) @@ -1163,7 +1146,7 @@ static int bch2_snapshot_node_delete(struct btree_trans *trans, u32 id) if (bch2_fs_inconsistent_on(i == 2, c, "snapshot %u missing child pointer to %u", parent_id, id)) - goto err; + return ret; parent->v.children[i] = cpu_to_le32(child_id); @@ -1171,16 +1154,14 @@ static int bch2_snapshot_node_delete(struct btree_trans *trans, u32 id) } if (child_id) { - struct bkey_i_snapshot *child; - - child = bch2_bkey_get_mut_typed(trans, &c_iter, - BTREE_ID_snapshots, POS(0, child_id), - 0, snapshot); + struct bkey_i_snapshot *child = + bch2_bkey_get_mut_typed(trans, BTREE_ID_snapshots, POS(0, child_id), + 0, snapshot); ret = PTR_ERR_OR_ZERO(child); bch2_fs_inconsistent_on(bch2_err_matches(ret, ENOENT), c, "missing snapshot %u", child_id); if (unlikely(ret)) - goto err; + return ret; child->v.parent = cpu_to_le32(parent_id); @@ -1197,16 +1178,15 @@ static int bch2_snapshot_node_delete(struct btree_trans *trans, u32 id) * snapshot_tree entry to point to the new root, or delete it if * this is the last snapshot ID in this tree: */ - struct bkey_i_snapshot_tree *s_t; BUG_ON(s->v.children[1]); - s_t = bch2_bkey_get_mut_typed(trans, &tree_iter, + struct bkey_i_snapshot_tree *s_t = bch2_bkey_get_mut_typed(trans, BTREE_ID_snapshot_trees, POS(0, le32_to_cpu(s->v.tree)), 0, snapshot_tree); ret = PTR_ERR_OR_ZERO(s_t); if (ret) - goto err; + return ret; if (s->v.children[0]) { s_t->v.root_snapshot = s->v.children[0]; @@ -1231,12 +1211,8 @@ static int bch2_snapshot_node_delete(struct btree_trans *trans, u32 id) s->k.type = KEY_TYPE_deleted; set_bkey_val_u64s(&s->k, 0); } -err: - bch2_trans_iter_exit(&tree_iter); - bch2_trans_iter_exit(&p_iter); - bch2_trans_iter_exit(&c_iter); - bch2_trans_iter_exit(&iter); - return ret; + + return 0; } static int create_snapids(struct btree_trans *trans, u32 parent, u32 tree, @@ -1248,8 +1224,7 @@ static int create_snapids(struct btree_trans *trans, u32 parent, u32 tree, struct bkey_i_snapshot *n; u32 depth = bch2_snapshot_depth(c, parent); - CLASS(btree_iter, iter)(trans, BTREE_ID_snapshots, - POS_MIN, BTREE_ITER_intent); + CLASS(btree_iter, iter)(trans, BTREE_ID_snapshots, POS_MIN, BTREE_ITER_intent); struct bkey_s_c k = bch2_btree_iter_peek(&iter); int ret = bkey_err(k); if (ret) @@ -1303,14 +1278,9 @@ static int bch2_snapshot_node_create_children(struct btree_trans *trans, u32 par u32 *snapshot_subvols, unsigned nr_snapids) { - struct btree_iter iter; - struct bkey_i_snapshot *n_parent; - int ret = 0; - - n_parent = bch2_bkey_get_mut_typed(trans, &iter, - BTREE_ID_snapshots, POS(0, parent), - 0, snapshot); - ret = PTR_ERR_OR_ZERO(n_parent); + struct bkey_i_snapshot *n_parent = + bch2_bkey_get_mut_typed(trans, BTREE_ID_snapshots, POS(0, parent), 0, snapshot); + int ret = PTR_ERR_OR_ZERO(n_parent); if (unlikely(ret)) { if (bch2_err_matches(ret, ENOENT)) bch_err(trans->c, "snapshot %u not found", parent); @@ -1319,22 +1289,19 @@ static int bch2_snapshot_node_create_children(struct btree_trans *trans, u32 par if (n_parent->v.children[0] || n_parent->v.children[1]) { bch_err(trans->c, "Trying to add child snapshot nodes to parent that already has children"); - ret = -EINVAL; - goto err; + return -EINVAL; } ret = create_snapids(trans, parent, le32_to_cpu(n_parent->v.tree), new_snapids, snapshot_subvols, nr_snapids); if (ret) - goto err; + return ret; n_parent->v.children[0] = cpu_to_le32(new_snapids[0]); n_parent->v.children[1] = cpu_to_le32(new_snapids[1]); n_parent->v.subvol = 0; SET_BCH_SNAPSHOT_SUBVOL(&n_parent->v, false); -err: - bch2_trans_iter_exit(&iter); - return ret; + return 0; } /* diff --git a/fs/bcachefs/subvolume.c b/fs/bcachefs/subvolume.c index 9145b7e73481..6023ae46ca72 100644 --- a/fs/bcachefs/subvolume.c +++ b/fs/bcachefs/subvolume.c @@ -539,13 +539,8 @@ static int bch2_subvolume_wait_for_pagecache_and_delete_hook(struct btree_trans int bch2_subvolume_unlink(struct btree_trans *trans, u32 subvolid) { - struct btree_iter iter; - struct bkey_i_subvolume *n; - struct subvolume_unlink_hook *h; - int ret = 0; - - h = bch2_trans_kmalloc(trans, sizeof(*h)); - ret = PTR_ERR_OR_ZERO(h); + struct subvolume_unlink_hook *h = bch2_trans_kmalloc(trans, sizeof(*h)); + int ret = PTR_ERR_OR_ZERO(h); if (ret) return ret; @@ -553,9 +548,9 @@ int bch2_subvolume_unlink(struct btree_trans *trans, u32 subvolid) h->subvol = subvolid; bch2_trans_commit_hook(trans, &h->h); - n = bch2_bkey_get_mut_typed(trans, &iter, - BTREE_ID_subvolumes, POS(0, subvolid), - BTREE_ITER_cached, subvolume); + struct bkey_i_subvolume *n = + bch2_bkey_get_mut_typed(trans, BTREE_ID_subvolumes, POS(0, subvolid), + BTREE_ITER_cached, subvolume); ret = PTR_ERR_OR_ZERO(n); if (bch2_err_matches(ret, ENOENT)) ret = bch2_subvolume_missing(trans->c, subvolid) ?: ret; @@ -564,7 +559,6 @@ int bch2_subvolume_unlink(struct btree_trans *trans, u32 subvolid) SET_BCH_SUBVOLUME_UNLINKED(&n->v, true); n->v.fs_path_parent = 0; - bch2_trans_iter_exit(&iter); return ret; } @@ -576,7 +570,7 @@ int bch2_subvolume_create(struct btree_trans *trans, u64 inode, bool ro) { struct bch_fs *c = trans->c; - struct btree_iter dst_iter, src_iter = (struct btree_iter) { NULL }; + struct btree_iter dst_iter; struct bkey_i_subvolume *new_subvol = NULL; struct bkey_i_subvolume *src_subvol = NULL; u32 parent = 0, new_nodes[2], snapshot_subvols[2]; @@ -595,9 +589,8 @@ int bch2_subvolume_create(struct btree_trans *trans, u64 inode, if (src_subvolid) { /* Creating a snapshot: */ - src_subvol = bch2_bkey_get_mut_typed(trans, &src_iter, - BTREE_ID_subvolumes, POS(0, src_subvolid), - BTREE_ITER_cached, subvolume); + src_subvol = bch2_bkey_get_mut_typed(trans, BTREE_ID_subvolumes, POS(0, src_subvolid), + BTREE_ITER_cached, subvolume); ret = PTR_ERR_OR_ZERO(src_subvol); if (bch2_err_matches(ret, ENOENT)) ret = bch2_subvolume_missing(trans->c, src_subvolid) ?: ret; @@ -613,12 +606,8 @@ int bch2_subvolume_create(struct btree_trans *trans, u64 inode, if (ret) goto err; - if (src_subvolid) { + if (src_subvolid) src_subvol->v.snapshot = cpu_to_le32(new_nodes[1]); - ret = bch2_trans_update(trans, &src_iter, &src_subvol->k_i, 0); - if (ret) - goto err; - } new_subvol = bch2_bkey_alloc(trans, &dst_iter, 0, subvolume); ret = PTR_ERR_OR_ZERO(new_subvol); @@ -639,7 +628,6 @@ int bch2_subvolume_create(struct btree_trans *trans, u64 inode, *new_subvolid = new_subvol->k.p.offset; *new_snapshotid = new_nodes[0]; err: - bch2_trans_iter_exit(&src_iter); bch2_trans_iter_exit(&dst_iter); return ret; } |