diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-12-10 19:26:30 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-01 11:47:44 -0500 |
commit | 0c99e17d3bd3b60ee7461cb8e87ff6badf228422 (patch) | |
tree | 6c8f7f8b7ad1f6bee380eb90cd2e57f099078fe3 /fs/bcachefs/btree_iter.h | |
parent | ff70ad2c8dfdcc24f98b645481116d4c2ea20e37 (diff) | |
download | lwn-0c99e17d3bd3b60ee7461cb8e87ff6badf228422.tar.gz lwn-0c99e17d3bd3b60ee7461cb8e87ff6badf228422.zip |
bcachefs: growable btree_paths
XXX: we're allocating memory with btree locks held - bad
We need to plumb through an error path so we can do
allocate_dropping_locks() - but we're merging this now because it fixes
a transaction path overflow caused by indirect extent fragmentation, and
the resize path is rare.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_iter.h')
-rw-r--r-- | fs/bcachefs/btree_iter.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/btree_iter.h b/fs/bcachefs/btree_iter.h index 573c44d80cc3..da2b74fa63fc 100644 --- a/fs/bcachefs/btree_iter.h +++ b/fs/bcachefs/btree_iter.h @@ -642,7 +642,7 @@ int __bch2_btree_trans_too_many_iters(struct btree_trans *); static inline int btree_trans_too_many_iters(struct btree_trans *trans) { - if (bitmap_weight(trans->paths_allocated, trans->nr_paths) > BTREE_ITER_MAX - 8) + if (bitmap_weight(trans->paths_allocated, trans->nr_paths) > BTREE_ITER_INITIAL - 8) return __bch2_btree_trans_too_many_iters(trans); return 0; |