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
68e14240
Commit
68e14240
authored
Apr 06, 2024
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: bch2_gc() is now private to btree_gc.c
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
665e8b32
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
25 deletions
+8
-25
fs/bcachefs/btree_gc.c
fs/bcachefs/btree_gc.c
+6
-8
fs/bcachefs/btree_gc.h
fs/bcachefs/btree_gc.h
+1
-1
fs/bcachefs/recovery_passes.c
fs/bcachefs/recovery_passes.c
+0
-5
fs/bcachefs/sysfs.c
fs/bcachefs/sysfs.c
+1
-11
No files found.
fs/bcachefs/btree_gc.c
View file @
68e14240
...
...
@@ -1756,7 +1756,7 @@ static void bch2_gc_stripes_reset(struct bch_fs *c, bool metadata_only)
* move around - if references move backwards in the ordering GC
* uses, GC could skip past them
*/
int
bch2_gc
(
struct
bch_fs
*
c
,
bool
initial
,
bool
metadata_only
)
static
int
bch2_gc
(
struct
bch_fs
*
c
,
bool
initial
,
bool
metadata_only
)
{
unsigned
iter
=
0
;
int
ret
;
...
...
@@ -1843,6 +1843,11 @@ int bch2_gc(struct bch_fs *c, bool initial, bool metadata_only)
return
ret
;
}
int
bch2_check_allocations
(
struct
bch_fs
*
c
)
{
return
bch2_gc
(
c
,
true
,
false
);
}
static
int
gc_btree_gens_key
(
struct
btree_trans
*
trans
,
struct
btree_iter
*
iter
,
struct
bkey_s_c
k
)
...
...
@@ -2024,14 +2029,7 @@ static int bch2_gc_thread(void *arg)
last
=
atomic64_read
(
&
clock
->
now
);
last_kick
=
atomic_read
(
&
c
->
kick_gc
);
/*
* Full gc is currently incompatible with btree key cache:
*/
#if 0
ret = bch2_gc(c, false, false);
#else
bch2_gc_gens
(
c
);
#endif
debug_check_no_locks_held
();
}
...
...
fs/bcachefs/btree_gc.h
View file @
68e14240
...
...
@@ -6,7 +6,7 @@
#include "btree_types.h"
int
bch2_check_topology
(
struct
bch_fs
*
);
int
bch2_
gc
(
struct
bch_fs
*
,
bool
,
bool
);
int
bch2_
check_allocations
(
struct
bch_fs
*
);
int
bch2_gc_gens
(
struct
bch_fs
*
);
void
bch2_gc_thread_stop
(
struct
bch_fs
*
);
int
bch2_gc_thread_start
(
struct
bch_fs
*
);
...
...
fs/bcachefs/recovery_passes.c
View file @
68e14240
...
...
@@ -26,11 +26,6 @@ const char * const bch2_recovery_passes[] = {
NULL
};
static
int
bch2_check_allocations
(
struct
bch_fs
*
c
)
{
return
bch2_gc
(
c
,
true
,
false
);
}
static
int
bch2_set_may_go_rw
(
struct
bch_fs
*
c
)
{
struct
journal_keys
*
keys
=
&
c
->
journal_keys
;
...
...
fs/bcachefs/sysfs.c
View file @
68e14240
...
...
@@ -501,18 +501,8 @@ STORE(bch2_fs)
if
(
attr
==
&
sysfs_btree_wakeup
)
bch2_btree_wakeup_all
(
c
);
if
(
attr
==
&
sysfs_trigger_gc
)
{
/*
* Full gc is currently incompatible with btree key cache:
*/
#if 0
down_read(&c->state_lock);
bch2_gc(c, false, false);
up_read(&c->state_lock);
#else
if
(
attr
==
&
sysfs_trigger_gc
)
bch2_gc_gens
(
c
);
#endif
}
if
(
attr
==
&
sysfs_trigger_discards
)
bch2_do_discards
(
c
);
...
...
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