]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crimson/os/seastore/journal/circular_bounded_journal: find the real 69301/head
authorXuehan Xu <xuxuehan@qianxin.com>
Fri, 5 Jun 2026 09:19:13 +0000 (17:19 +0800)
committerXuehan Xu <xuxuehan@qianxin.com>
Mon, 29 Jun 2026 02:24:57 +0000 (10:24 +0800)
commit69cd81f14718e62d8c8c71900813086beed415f4
tree92de872530a6427a148182812262761001c0f582
parentaa9247a36cfc26b791ce10efab0e1eae7624faae
crimson/os/seastore/journal/circular_bounded_journal: find the real
journal tail on startup

Recover the correct journal tail during replay by scanning
JOURNAL_TAIL records instead of relying solely on the on-disk
header, which may be stale if a crash occurs between record
write and header update.

The journal header is stored *separately* from the (append-only)
journal and is not updated atomically with journal writes,
so it may lag behind after a crash.
Treat the journal as the source of truth and rebuild the tail from persisted records.

Replay is reorganized into three passes:
1) discover latest journal tail
2) rebuild allocation map
3) replay deltas

Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
src/crimson/os/seastore/journal/circular_bounded_journal.cc
src/crimson/os/seastore/journal/circular_journal_space.h