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
a5a650d6
Commit
a5a650d6
authored
Feb 08, 2024
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: thread_with_stdio: suppress hung task warning
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
5c3273ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
fs/bcachefs/thread_with_file.c
fs/bcachefs/thread_with_file.c
+15
-2
No files found.
fs/bcachefs/thread_with_file.c
View file @
a5a650d6
...
...
@@ -9,6 +9,7 @@
#include <linux/kthread.h>
#include <linux/pagemap.h>
#include <linux/poll.h>
#include <linux/sched/sysctl.h>
void
bch2_thread_with_file_exit
(
struct
thread_with_file
*
thr
)
{
...
...
@@ -264,7 +265,15 @@ int bch2_stdio_redirect_read(struct stdio_redirect *stdio, char *ubuf, size_t le
{
struct
stdio_buf
*
buf
=
&
stdio
->
input
;
wait_event
(
buf
->
wait
,
stdio_redirect_has_input
(
stdio
));
/*
* we're waiting on user input (or for the file descriptor to be
* closed), don't want a hung task warning:
*/
do
{
wait_event_timeout
(
buf
->
wait
,
stdio_redirect_has_input
(
stdio
),
sysctl_hung_task_timeout_secs
*
HZ
/
2
);
}
while
(
!
stdio_redirect_has_input
(
stdio
));
if
(
stdio
->
done
)
return
-
1
;
...
...
@@ -287,7 +296,11 @@ int bch2_stdio_redirect_readline(struct stdio_redirect *stdio, char *ubuf, size_
size_t
copied
=
0
;
ssize_t
ret
=
0
;
again:
wait_event
(
buf
->
wait
,
stdio_redirect_has_input
(
stdio
));
do
{
wait_event_timeout
(
buf
->
wait
,
stdio_redirect_has_input
(
stdio
),
sysctl_hung_task_timeout_secs
*
HZ
/
2
);
}
while
(
!
stdio_redirect_has_input
(
stdio
));
if
(
stdio
->
done
)
{
ret
=
-
1
;
goto
out
;
...
...
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