Skip to content

Commit aed4ccb

Browse files
author
Kent Overstreet
committed
bcachefs: fix hung task timeout in journal read
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
1 parent 7a69fa6 commit aed4ccb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/bcachefs/journal_io.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include <linux/ioprio.h>
2121
#include <linux/string_choices.h>
22+
#include <linux/sched/sysctl.h>
2223

2324
void bch2_journal_pos_from_member_info_set(struct bch_fs *c)
2425
{
@@ -1262,7 +1263,8 @@ int bch2_journal_read(struct bch_fs *c,
12621263
degraded = true;
12631264
}
12641265

1265-
closure_sync(&jlist.cl);
1266+
while (closure_sync_timeout(&jlist.cl, sysctl_hung_task_timeout_secs * HZ / 2))
1267+
;
12661268

12671269
if (jlist.ret)
12681270
return jlist.ret;

0 commit comments

Comments
 (0)