diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-12-10 17:44:04 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-01 11:47:41 -0500 |
commit | f33600057f50d3dea5cb3bda05c21ecce7125282 (patch) | |
tree | 7b3f7f8c92137bfec2da55b5a9df78064196c793 /fs/bcachefs/btree_update_interior.c | |
parent | 24de63dacbffbfa069b44a1da1750eb5382275e7 (diff) | |
download | linux-stable-f33600057f50d3dea5cb3bda05c21ecce7125282.tar.gz linux-stable-f33600057f50d3dea5cb3bda05c21ecce7125282.tar.bz2 linux-stable-f33600057f50d3dea5cb3bda05c21ecce7125282.zip |
bcachefs: bch2_trans_node_add no longer uses trans_for_each_path()
In the future we'll be making trans->paths resizable and potentially
having _many_ more paths (for fsck); we need to start fixing algorithms
that walk each path in a transaction where possible.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_update_interior.c')
-rw-r--r-- | fs/bcachefs/btree_update_interior.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/bcachefs/btree_update_interior.c b/fs/bcachefs/btree_update_interior.c index b3f1f7c9a5f4..cffc66cd481f 100644 --- a/fs/bcachefs/btree_update_interior.c +++ b/fs/bcachefs/btree_update_interior.c @@ -1601,10 +1601,10 @@ static int btree_split(struct btree_update *as, struct btree_trans *trans, bch2_btree_node_free_inmem(trans, path, b); if (n3) - bch2_trans_node_add(trans, n3); + bch2_trans_node_add(trans, path, n3); if (n2) - bch2_trans_node_add(trans, n2); - bch2_trans_node_add(trans, n1); + bch2_trans_node_add(trans, path2, n2); + bch2_trans_node_add(trans, path1, n1); if (n3) six_unlock_intent(&n3->c.lock); @@ -1913,7 +1913,7 @@ int __bch2_foreground_maybe_merge(struct btree_trans *trans, bch2_btree_node_free_inmem(trans, path, b); bch2_btree_node_free_inmem(trans, sib_path, m); - bch2_trans_node_add(trans, n); + bch2_trans_node_add(trans, path, n); bch2_trans_verify_paths(trans); @@ -1985,7 +1985,7 @@ int bch2_btree_node_rewrite(struct btree_trans *trans, bch2_btree_node_free_inmem(trans, iter->path, b); - bch2_trans_node_add(trans, n); + bch2_trans_node_add(trans, iter->path, n); six_unlock_intent(&n->c.lock); bch2_btree_update_done(as, trans); |