summaryrefslogtreecommitdiff
path: root/fs/bcachefs/thread_with_file_types.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-12-31 18:04:54 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2024-01-06 07:24:19 +0300
commit96f37eabe7a5cb4746f369e959f935be464950be (patch)
tree7687178f9db3a005ece86a80e4b3c222736ed3a1 /fs/bcachefs/thread_with_file_types.h
parentf60250de329ae6dbf8aeb49ebb13bf0b79e86a1d (diff)
downloadlinux-96f37eabe7a5cb4746f369e959f935be464950be.tar.xz
bcachefs: factor out thread_with_file, thread_with_stdio
thread_with_stdio now knows how to handle input - fsck can now prompt to fix errors. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/thread_with_file_types.h')
-rw-r--r--fs/bcachefs/thread_with_file_types.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/bcachefs/thread_with_file_types.h b/fs/bcachefs/thread_with_file_types.h
new file mode 100644
index 000000000000..90b5e645e98c
--- /dev/null
+++ b/fs/bcachefs/thread_with_file_types.h
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _BCACHEFS_THREAD_WITH_FILE_TYPES_H
+#define _BCACHEFS_THREAD_WITH_FILE_TYPES_H
+
+struct stdio_redirect {
+ spinlock_t output_lock;
+ wait_queue_head_t output_wait;
+ struct printbuf output_buf;
+
+ spinlock_t input_lock;
+ wait_queue_head_t input_wait;
+ struct printbuf input_buf;
+ bool done;
+};
+
+#endif /* _BCACHEFS_THREAD_WITH_FILE_TYPES_H */