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
dd3995a6
Commit
dd3995a6
authored
Jun 07, 2024
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: bch2_gc_pos_to_text()
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
11169d99
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
4 deletions
+27
-4
fs/bcachefs/btree_gc.c
fs/bcachefs/btree_gc.c
+16
-0
fs/bcachefs/btree_gc.h
fs/bcachefs/btree_gc.h
+2
-0
fs/bcachefs/btree_gc_types.h
fs/bcachefs/btree_gc_types.h
+9
-4
No files found.
fs/bcachefs/btree_gc.c
View file @
dd3995a6
...
...
@@ -45,6 +45,22 @@
#define DROP_PREV_NODE 11
#define DID_FILL_FROM_SCAN 12
static
const
char
*
const
bch2_gc_phase_strs
[]
=
{
#define x(n) #n,
GC_PHASES
()
#undef x
NULL
};
void
bch2_gc_pos_to_text
(
struct
printbuf
*
out
,
struct
gc_pos
*
p
)
{
prt_str
(
out
,
bch2_gc_phase_strs
[
p
->
phase
]);
prt_char
(
out
,
' '
);
bch2_btree_id_to_text
(
out
,
p
->
btree
);
prt_printf
(
out
,
" l=%u "
,
p
->
level
);
bch2_bpos_to_text
(
out
,
p
->
pos
);
}
static
struct
bkey_s
unsafe_bkey_s_c_to_s
(
struct
bkey_s_c
k
)
{
return
(
struct
bkey_s
)
{{{
...
...
fs/bcachefs/btree_gc.h
View file @
dd3995a6
...
...
@@ -78,6 +78,8 @@ static inline bool gc_visited(struct bch_fs *c, struct gc_pos pos)
return
ret
;
}
void
bch2_gc_pos_to_text
(
struct
printbuf
*
,
struct
gc_pos
*
);
int
bch2_gc_gens
(
struct
bch_fs
*
);
void
bch2_gc_gens_async
(
struct
bch_fs
*
);
void
bch2_fs_gc_init
(
struct
bch_fs
*
);
...
...
fs/bcachefs/btree_gc_types.h
View file @
dd3995a6
...
...
@@ -4,11 +4,16 @@
#include <linux/generic-radix-tree.h>
#define GC_PHASES() \
x(not_running) \
x(start) \
x(sb) \
x(btree)
enum
gc_phase
{
GC_PHASE_not_running
,
GC_PHASE_start
,
GC_PHASE_sb
,
GC_PHASE_btree
,
#define x(n) GC_PHASE_##n,
GC_PHASES
()
#undef x
};
struct
gc_pos
{
...
...
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