summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/journal_io.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-10-09 21:51:05 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2024-12-21 01:36:15 -0500
commit106480e9a869e8d2dd2db34819d04e15ccfd896c (patch)
treee61bcc3c771a863aedb56eccbb0c6dc61551e5d4 /fs/bcachefs/journal_io.c
parentbcachefs: improved bkey_val_copy() (diff)
downloadlinux-106480e9a869e8d2dd2db34819d04e15ccfd896c.tar.gz
linux-106480e9a869e8d2dd2db34819d04e15ccfd896c.zip
bcachefs: Factor out jset_entry_log_msg_bytes()
Needed for improved userspace cmd_list_journal Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal_io.c')
-rw-r--r--fs/bcachefs/journal_io.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/bcachefs/journal_io.c b/fs/bcachefs/journal_io.c
index fb35dd336331..7c7595e5369b 100644
--- a/fs/bcachefs/journal_io.c
+++ b/fs/bcachefs/journal_io.c
@@ -738,9 +738,8 @@ static void journal_entry_log_to_text(struct printbuf *out, struct bch_fs *c,
struct jset_entry *entry)
{
struct jset_entry_log *l = container_of(entry, struct jset_entry_log, entry);
- unsigned bytes = vstruct_bytes(entry) - offsetof(struct jset_entry_log, d);
- prt_printf(out, "%.*s", bytes, l->d);
+ prt_printf(out, "%.*s", jset_entry_log_msg_bytes(l), l->d);
}
static int journal_entry_overwrite_validate(struct bch_fs *c,