diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-04-17 01:44:12 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-04-17 01:44:20 -0400 |
commit | c824bbe69db5d7ff5722033af1dcd01f41348206 (patch) | |
tree | 2c242a9f85fb1bcd9847e5be9e746621397f7dc6 /libbcachefs/thread_with_file.c | |
parent | cf44deafe69a691d9f2087155b8943e600093394 (diff) |
Update bcachefs sources to 10ca1f99f8c9 bcachefs: Fix bch2_dev_btree_bitmap_marked_sectors() shift
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'libbcachefs/thread_with_file.c')
-rw-r--r-- | libbcachefs/thread_with_file.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/libbcachefs/thread_with_file.c b/libbcachefs/thread_with_file.c index 940db15d..b1af7ac4 100644 --- a/libbcachefs/thread_with_file.c +++ b/libbcachefs/thread_with_file.c @@ -294,16 +294,27 @@ static int thread_with_stdio_fn(void *arg) return 0; } -int bch2_run_thread_with_stdio(struct thread_with_stdio *thr, - const struct thread_with_stdio_ops *ops) +void bch2_thread_with_stdio_init(struct thread_with_stdio *thr, + const struct thread_with_stdio_ops *ops) { stdio_buf_init(&thr->stdio.input); stdio_buf_init(&thr->stdio.output); thr->ops = ops; +} +int __bch2_run_thread_with_stdio(struct thread_with_stdio *thr) +{ return bch2_run_thread_with_file(&thr->thr, &thread_with_stdio_fops, thread_with_stdio_fn); } +int bch2_run_thread_with_stdio(struct thread_with_stdio *thr, + const struct thread_with_stdio_ops *ops) +{ + bch2_thread_with_stdio_init(thr, ops); + + return __bch2_run_thread_with_stdio(thr); +} + int bch2_run_thread_with_stdout(struct thread_with_stdio *thr, const struct thread_with_stdio_ops *ops) { |