summaryrefslogtreecommitdiff
path: root/fs/bcachefs/journal_io.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-11-16 04:25:08 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:46 +0300
commit7fec8266af12b655e98978050e716e12e8544fe6 (patch)
tree7634750a6ce6ebdbb72a836d26684f689f3f7e81 /fs/bcachefs/journal_io.c
parent8eb71e9e1af8aaec3c70673560931a328fe840bd (diff)
downloadlinux-7fec8266af12b655e98978050e716e12e8544fe6.tar.xz
bcachefs: Error message improvement
- Centralize format strings in bcachefs.h - Add bch2_fmt_inum_offset() and related helpers - Switch error messages for inodes to also print out the offset, in bytes Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal_io.c')
-rw-r--r--fs/bcachefs/journal_io.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/bcachefs/journal_io.c b/fs/bcachefs/journal_io.c
index 1db2ccf2627a..6b9bd1f55fe3 100644
--- a/fs/bcachefs/journal_io.c
+++ b/fs/bcachefs/journal_io.c
@@ -1268,10 +1268,10 @@ int bch2_journal_read(struct bch_fs *c, u64 *blacklist_seq, u64 *start_seq)
struct bch_dev *ca = bch_dev_bkey_exists(c, i->ptrs[ptr].dev);
if (!i->ptrs[ptr].csum_good)
- printk(KERN_ERR "bcachefs (%s) sector %llu: invalid journal checksum, seq %llu%s\n",
- ca->name, i->ptrs[ptr].sector,
- le64_to_cpu(i->j.seq),
- i->csum_good ? " (had good copy on another device)" : "");
+ bch_err_dev_offset(ca, i->ptrs[ptr].sector,
+ "invalid journal checksum, seq %llu%s",
+ le64_to_cpu(i->j.seq),
+ i->csum_good ? " (had good copy on another device)" : "");
}
ret = jset_validate(c,