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
36008d5d
Commit
36008d5d
authored
May 29, 2024
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Plumb more logging through stdio redirect
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
a850bde6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
2 deletions
+17
-2
fs/bcachefs/bcachefs.h
fs/bcachefs/bcachefs.h
+2
-0
fs/bcachefs/btree_iter.c
fs/bcachefs/btree_iter.c
+2
-2
fs/bcachefs/super.c
fs/bcachefs/super.c
+13
-0
No files found.
fs/bcachefs/bcachefs.h
View file @
36008d5d
...
...
@@ -267,6 +267,8 @@ do { \
#define bch2_fmt(_c, fmt) bch2_log_msg(_c, fmt "\n")
void
bch2_print_str
(
struct
bch_fs
*
,
const
char
*
);
__printf
(
2
,
3
)
void
bch2_print_opts
(
struct
bch_opts
*
,
const
char
*
,
...);
...
...
fs/bcachefs/btree_iter.c
View file @
36008d5d
...
...
@@ -1465,7 +1465,7 @@ void bch2_dump_trans_updates(struct btree_trans *trans)
struct
printbuf
buf
=
PRINTBUF
;
bch2_trans_updates_to_text
(
&
buf
,
trans
);
bch2_print_str
ing_as_lines
(
KERN_ERR
,
buf
.
buf
);
bch2_print_str
(
trans
->
c
,
buf
.
buf
);
printbuf_exit
(
&
buf
);
}
...
...
@@ -1557,7 +1557,7 @@ void __bch2_dump_trans_paths_updates(struct btree_trans *trans, bool nosort)
__bch2_trans_paths_to_text
(
&
buf
,
trans
,
nosort
);
bch2_trans_updates_to_text
(
&
buf
,
trans
);
bch2_print_str
ing_as_lines
(
KERN_ERR
,
buf
.
buf
);
bch2_print_str
(
trans
->
c
,
buf
.
buf
);
printbuf_exit
(
&
buf
);
}
...
...
fs/bcachefs/super.c
View file @
36008d5d
...
...
@@ -89,6 +89,19 @@ const char * const bch2_fs_flag_strs[] = {
NULL
};
void
bch2_print_str
(
struct
bch_fs
*
c
,
const
char
*
str
)
{
#ifdef __KERNEL__
struct
stdio_redirect
*
stdio
=
bch2_fs_stdio_redirect
(
c
);
if
(
unlikely
(
stdio
))
{
bch2_stdio_redirect_printf
(
stdio
,
true
,
"%s"
,
str
);
return
;
}
#endif
bch2_print_string_as_lines
(
KERN_ERR
,
str
);
}
__printf
(
2
,
0
)
static
void
bch2_print_maybe_redirect
(
struct
stdio_redirect
*
stdio
,
const
char
*
fmt
,
va_list
args
)
{
...
...
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