diff options
| author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-05-29 20:34:48 -0400 |
|---|---|---|
| committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-07-14 19:00:14 -0400 |
| commit | 0c97c437e362fb825b7501bd5da801bac77981b4 (patch) | |
| tree | 043eb2b235194e021568ffab24536473d197e71b /fs/bcachefs/thread_with_file.h | |
| parent | bcachefs: Plumb more logging through stdio redirect (diff) | |
| download | linux-0c97c437e362fb825b7501bd5da801bac77981b4.tar.gz linux-0c97c437e362fb825b7501bd5da801bac77981b4.zip | |
bcachefs: twf: convert bch2_stdio_redirect_readline() to darray
We now read the line from the buffer atomically, which means we have to
allow the buffer to grow past STDIO_REDIRECT_BUFSIZE if we're waiting
for a full line - this behaviour is necessary for
stdio_redirect_readline_timeout() in the next patch.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/thread_with_file.h')
| -rw-r--r-- | fs/bcachefs/thread_with_file.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/thread_with_file.h b/fs/bcachefs/thread_with_file.h index 1d63d14d7dca..e415dc2e2fb1 100644 --- a/fs/bcachefs/thread_with_file.h +++ b/fs/bcachefs/thread_with_file.h @@ -71,7 +71,8 @@ int bch2_run_thread_with_stdio(struct thread_with_stdio *, int bch2_run_thread_with_stdout(struct thread_with_stdio *, const struct thread_with_stdio_ops *); int bch2_stdio_redirect_read(struct stdio_redirect *, char *, size_t); -int bch2_stdio_redirect_readline(struct stdio_redirect *, char *, size_t); + +int bch2_stdio_redirect_readline(struct stdio_redirect *, darray_char *); __printf(3, 0) ssize_t bch2_stdio_redirect_vprintf(struct stdio_redirect *, bool, const char *, va_list); __printf(3, 4) ssize_t bch2_stdio_redirect_printf(struct stdio_redirect *, bool, const char *, ...); |
