diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-02-05 00:51:23 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-03-22 17:33:11 -0400 |
commit | e5cf4d5ae338b4e3ac5ba6af3f2fb03306eaf5d9 (patch) | |
tree | 903c307b84c133175cf62b376de220b1c2bea316 /fs/bcachefs/error.c | |
parent | d02f81d6093a8ffe1ca6673a118ca84a55c3cace (diff) |
thread_with_file: Lift from bcachefstime_stats_twf
thread_with_file and thread_with_stdio are abstractions for connecting
kthreads to file descriptors, which is handy for all sorts of things -
the running kthread has its lifetime connected to the file descriptor,
which means an asynchronous job running in the kernel can easily exit in
response to a ctrl-c, and the file descriptor also provides a
communications channel.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/error.c')
-rw-r--r-- | fs/bcachefs/error.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/error.c b/fs/bcachefs/error.c index 043431206799..8ae95b218e8b 100644 --- a/fs/bcachefs/error.c +++ b/fs/bcachefs/error.c @@ -3,7 +3,7 @@ #include "error.h" #include "recovery.h" #include "super.h" -#include "thread_with_file.h" +#include <linux/thread_with_file.h> #define FSCK_ERR_RATELIMIT_NR 10 @@ -111,7 +111,7 @@ static enum ask_yn bch2_fsck_ask_yn(struct bch_fs *c) do { bch2_print(c, " (y,n, or Y,N for all errors of this type) "); - int r = bch2_stdio_redirect_readline(stdio, buf, sizeof(buf) - 1); + int r = stdio_redirect_readline(stdio, buf, sizeof(buf) - 1); if (r < 0) return YN_NO; buf[r] = '\0'; |