]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
crimson/os/seastore/journal/cbj: introduce magic value to identify that written recor...
authormyoungwon oh <ohmyoungwon@gmail.com>
Sat, 22 Jul 2023 14:52:14 +0000 (14:52 +0000)
committermyoungwon oh <ohmyoungwon@gmail.com>
Wed, 16 Aug 2023 16:02:57 +0000 (16:02 +0000)
commit942ea6487f59e52d88050fb8deb8a2e6c0ca83c3
tree510dedd30286c6b3165bc5c0706806856419fb04
parenta580e516965ff8ae57dbaab202854f9ebe38ba5f
crimson/os/seastore/journal/cbj: introduce magic value to identify that written records are correct

The cbj would replay invalid records if the same write pattern (mkfs -> write -> mkfs -> write) repeats.
On the second mkfs(), current cbj wrongly recognizes the old records are valid beceause they have
correct seq. number at appropriate offset even though the records are expired.

To solve this, this commit introduces random value to identify the journal  during mkfs()

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
src/crimson/os/seastore/journal/circular_bounded_journal.cc
src/crimson/os/seastore/journal/circular_bounded_journal.h
src/crimson/os/seastore/journal/circular_journal_space.cc
src/crimson/os/seastore/journal/circular_journal_space.h
src/test/crimson/seastore/test_cbjournal.cc