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
11169d99
Commit
11169d99
authored
Jun 07, 2024
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: bch2_btree_id_to_text()
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
ae4fb17e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
fs/bcachefs/btree_cache.c
fs/bcachefs/btree_cache.c
+8
-0
fs/bcachefs/btree_cache.h
fs/bcachefs/btree_cache.h
+2
-0
No files found.
fs/bcachefs/btree_cache.c
View file @
11169d99
...
...
@@ -1257,6 +1257,14 @@ const char *bch2_btree_id_str(enum btree_id btree)
return
btree
<
BTREE_ID_NR
?
__bch2_btree_ids
[
btree
]
:
"(unknown)"
;
}
void
bch2_btree_id_to_text
(
struct
printbuf
*
out
,
enum
btree_id
btree
)
{
if
(
btree
<
BTREE_ID_NR
)
prt_str
(
out
,
__bch2_btree_ids
[
btree
]);
else
prt_printf
(
out
,
"(unknown btree %u)"
,
btree
);
}
void
bch2_btree_pos_to_text
(
struct
printbuf
*
out
,
struct
bch_fs
*
c
,
const
struct
btree
*
b
)
{
prt_printf
(
out
,
"%s level %u/%u
\n
"
,
...
...
fs/bcachefs/btree_cache.h
View file @
11169d99
...
...
@@ -132,6 +132,8 @@ static inline struct btree *btree_node_root(struct bch_fs *c, struct btree *b)
}
const
char
*
bch2_btree_id_str
(
enum
btree_id
);
void
bch2_btree_id_to_text
(
struct
printbuf
*
,
enum
btree_id
);
void
bch2_btree_pos_to_text
(
struct
printbuf
*
,
struct
bch_fs
*
,
const
struct
btree
*
);
void
bch2_btree_node_to_text
(
struct
printbuf
*
,
struct
bch_fs
*
,
const
struct
btree
*
);
void
bch2_btree_cache_to_text
(
struct
printbuf
*
,
const
struct
btree_cache
*
);
...
...
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