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
4881fdb7
Commit
4881fdb7
authored
Apr 04, 2019
by
Kent Overstreet
Committed by
Kent Overstreet
Oct 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: initial gc no longer needs to touch every node
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
1dd7f9d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
12 deletions
+4
-12
fs/bcachefs/btree_gc.c
fs/bcachefs/btree_gc.c
+4
-12
No files found.
fs/bcachefs/btree_gc.c
View file @
4881fdb7
...
...
@@ -210,7 +210,10 @@ static int bch2_gc_btree(struct bch_fs *c, enum btree_id btree_id,
struct
btree_iter
*
iter
;
struct
btree
*
b
;
struct
range_checks
r
;
unsigned
depth
=
btree_node_type_needs_gc
(
btree_id
)
?
0
:
1
;
unsigned
depth
=
metadata_only
?
1
:
expensive_debug_checks
(
c
)
?
0
:
!
btree_node_type_needs_gc
(
btree_id
)
?
1
:
0
;
u8
max_stale
;
int
ret
=
0
;
...
...
@@ -218,17 +221,6 @@ static int bch2_gc_btree(struct bch_fs *c, enum btree_id btree_id,
gc_pos_set
(
c
,
gc_pos_btree
(
btree_id
,
POS_MIN
,
0
));
/*
* if expensive_debug_checks is on, run range_checks on all leaf nodes:
*
* and on startup, we have to read every btree node (XXX: only if it was
* an unclean shutdown)
*/
if
(
metadata_only
)
depth
=
1
;
else
if
(
initial
||
expensive_debug_checks
(
c
))
depth
=
0
;
btree_node_range_checks_init
(
&
r
,
depth
);
__for_each_btree_node
(
&
trans
,
iter
,
btree_id
,
POS_MIN
,
...
...
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