From: Kent Overstreet Date: Tue, 14 Mar 2023 01:58:14 +0000 (-0400) Subject: bcachefs: Don't use BTREE_ITER_INTENT in make_extent_indirect() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3997989ae1541dea4bb144bd2bf8b7dc6cae743f;p=linux.git bcachefs: Don't use BTREE_ITER_INTENT in make_extent_indirect() This is a workaround for a btree path overflow - searching with BTREE_ITER_INTENT periodically saves the iterator position for updates, which eventually overflows. Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/reflink.c b/fs/bcachefs/reflink.c index d2e6adc13fb17..d8426e754cdf0 100644 --- a/fs/bcachefs/reflink.c +++ b/fs/bcachefs/reflink.c @@ -189,7 +189,7 @@ static int bch2_make_extent_indirect(struct btree_trans *trans, for_each_btree_key_norestart(trans, reflink_iter, BTREE_ID_reflink, POS(0, c->reflink_hint), - BTREE_ITER_INTENT|BTREE_ITER_SLOTS, k, ret) { + BTREE_ITER_SLOTS, k, ret) { if (reflink_iter.pos.inode) { bch2_btree_iter_set_pos(&reflink_iter, POS_MIN); continue;