bcachefs: thread_with_file: fix various printf problems
authorDarrick J. Wong <djwong@kernel.org>
Wed, 7 Feb 2024 19:39:03 +0000 (11:39 -0800)
committerKent Overstreet <kent.overstreet@linux.dev>
Thu, 14 Mar 2024 01:22:10 +0000 (21:22 -0400)
commit1cbae651e5c875f4d128211b3c732ee545f45424
tree611bcce0b30736e2312cb8842f2da40223bf371e
parentfcb1620edd4d59eff4b3466be1d61263cea958a8
bcachefs: thread_with_file: fix various printf problems

Experimentally fix some problems with stdio_redirect_vprintf by creating
a MOO variant with which we can experiment.  We can't do a GFP_KERNEL
allocation while holding the spinlock, and I don't like how the printf
function can silently truncate the output if memory allocation fails.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/thread_with_file.c
fs/bcachefs/thread_with_file.h