summaryrefslogtreecommitdiff
path: root/fs/bcachefs/printbuf.c
AgeCommit message (Collapse)AuthorFilesLines
2025-03-29bcachefs: Consistent indentation of multiline fsck errorsKent Overstreet1-0/+19
Add the new helper printbuf_indent_add_nextline(), and use it in __bch2_fsck_err() to centralize setting the indentation of multiline fsck errors. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-07-15bcachefs: bch2_printbuf_strip_trailing_newline()Kent Overstreet1-0/+14
Add a new helper to fix inode_to_text() Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-05-23bcachefs: Fix shutdown orderingKent Overstreet1-0/+7
the btree key cache uses the srcu struct created/destroyed by btree_iter.c; btree_iter needs to be exited last. Reported-by: syzbot+3af9daea347788b15213@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-05-09bcachefs: printbufs: prt_printf() now handles \t\r\nKent Overstreet1-63/+106
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-05-09bcachefs: printbuf improvementsKent Overstreet1-34/+31
- fix assorted (harmless) off-by-one errors - we were inconsistent on whether out->pos stays <= out->size on overflow; now it does, and printbuf.overflow exists to indicate if a printbuf has overflowed - factor out printbuf_advance_pos() - printbuf_nul_terminate_reserved(); use this to reduce the number of printbuf_make_room() calls Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-02-14bcachefs: Fix missing va_end()Kent Overstreet1-0/+1
Fixes: https://lore.kernel.org/linux-bcachefs/202402131603.E953E2CF@keescook/T/#u Reported-by: coverity scan Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-01-01bcachefs: prt_bitflags_vector()Kent Overstreet1-0/+22
similar to prt_bitflags(), but for ulong arrays Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-10-31bcachefs: Fix bch2_prt_bitflags()Kent Overstreet1-2/+2
This fixes an infinite loop when there's a set bit at position >= 32. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-10-23bcachefs: Fix W=12 build errorsKent Overstreet1-28/+38
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-10-23bcachefs: Printbuf reworkKent Overstreet1-0/+415
This converts bcachefs to the modern printbuf interface/implementation, synced with the version to be submitted upstream. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>