diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-02-19 09:18:18 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:24 +0300 |
commit | 72b7d6332b0a769b0b76c78b372aa733a3715c42 (patch) | |
tree | b8d477ea130b40b0fb30145ac137f91a101a88cf /fs/bcachefs/journal_io.h | |
parent | a9de137bf63107245b43e9046cddc1acc447221a (diff) | |
download | linux-72b7d6332b0a769b0b76c78b372aa733a3715c42.tar.xz |
bcachefs: Store logical location of journal entries
When viewing what's in the journal, it's more useful to have the logical
location - journal bucket and offset within that bucket - than just the
offset on that device.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/journal_io.h')
-rw-r--r-- | fs/bcachefs/journal_io.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/bcachefs/journal_io.h b/fs/bcachefs/journal_io.h index d8425fe0d67b..f2001835e43e 100644 --- a/fs/bcachefs/journal_io.h +++ b/fs/bcachefs/journal_io.h @@ -8,7 +8,12 @@ */ struct journal_replay { struct list_head list; - struct bch_extent_ptr ptrs[BCH_REPLICAS_MAX]; + struct journal_ptr { + u8 dev; + u32 bucket; + u32 bucket_offset; + u64 sector; + } ptrs[BCH_REPLICAS_MAX]; unsigned nr_ptrs; /* checksum error, but we may want to try using it anyways: */ @@ -45,6 +50,9 @@ int bch2_journal_entry_validate(struct bch_fs *, const char *, void bch2_journal_entry_to_text(struct printbuf *, struct bch_fs *, struct jset_entry *); +void bch2_journal_ptrs_to_text(struct printbuf *, struct bch_fs *, + struct journal_replay *); + int bch2_journal_read(struct bch_fs *, struct list_head *, u64 *, u64 *); void bch2_journal_write(struct closure *); |