summaryrefslogtreecommitdiff
path: root/fs/bcachefs/error.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-11-14 04:01:42 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:46 +0300
commitb2d1d56b1d34bcfb6da77eb74a2fbcdea92514f9 (patch)
tree01c678f5b0e103d80567273497fd3429ae265dbb /fs/bcachefs/error.c
parenta7ecd30c8300624448c4e66cd7a7e7209b96ea61 (diff)
downloadlinux-b2d1d56b1d34bcfb6da77eb74a2fbcdea92514f9.tar.xz
bcachefs: Fixes for building in userspace
- Marking a non-static function as inline doesn't actually work and is now causing problems - drop that - Introduce BCACHEFS_LOG_PREFIX for when we want to prefix log messages with bcachefs (filesystem name) - Userspace doesn't have real percpu variables (maybe we can get this fixed someday), put an #ifdef around bch2_disk_reservation_add() fastpath Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/error.c')
-rw-r--r--fs/bcachefs/error.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/error.c b/fs/bcachefs/error.c
index 2fb5102ee31d..3e49d72d65b5 100644
--- a/fs/bcachefs/error.c
+++ b/fs/bcachefs/error.c
@@ -125,8 +125,10 @@ int bch2_fsck_err(struct bch_fs *c, unsigned flags, const char *fmt, ...)
s->nr++;
}
+#ifdef BCACHEFS_LOG_PREFIX
if (!strncmp(fmt, "bcachefs:", 9))
prt_printf(out, bch2_log_msg(c, ""));
+#endif
va_start(args, fmt);
prt_vprintf(out, fmt, args);