Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
be42e4a6
Commit
be42e4a6
authored
Apr 04, 2024
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Bump limit in btree_trans_too_many_iters()
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
01e5f4fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
fs/bcachefs/btree_iter.h
fs/bcachefs/btree_iter.h
+1
-1
fs/bcachefs/btree_types.h
fs/bcachefs/btree_types.h
+14
-0
No files found.
fs/bcachefs/btree_iter.h
View file @
be42e4a6
...
...
@@ -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_
INITIAL
-
8
)
if
(
bitmap_weight
(
trans
->
paths_allocated
,
trans
->
nr_paths
)
>
BTREE_ITER_
NORMAL_LIMIT
-
8
)
return
__bch2_btree_trans_too_many_iters
(
trans
);
return
0
;
...
...
fs/bcachefs/btree_types.h
View file @
be42e4a6
...
...
@@ -364,7 +364,21 @@ struct btree_insert_entry {
unsigned
long
ip_allocated
;
};
/* Number of btree paths we preallocate, usually enough */
#define BTREE_ITER_INITIAL 64
/*
* Lmiit for btree_trans_too_many_iters(); this is enough that almost all code
* paths should run inside this limit, and if they don't it usually indicates a
* bug (leaking/duplicated btree paths).
*
* exception: some fsck paths
*
* bugs with excessive path usage seem to have possibly been eliminated now, so
* we might consider eliminating this (and btree_trans_too_many_iter()) at some
* point.
*/
#define BTREE_ITER_NORMAL_LIMIT 256
/* never exceed limit */
#define BTREE_ITER_MAX (1U << 10)
struct
btree_trans_commit_hook
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment