]> git.apps.os.sepia.ceph.com Git - ceph.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)
committerMatan Breizman <mbreizma@redhat.com>
Wed, 11 Oct 2023 11:49:52 +0000 (11:49 +0000)
commit654e227bb0fadeeaff95b7cfdd853220a4dc1f37
tree9eb707fbddf23cdff558ef8323e7a7764da4be62
parent9f3cee3b700bf21e3931c829578f5b214f7eebfb
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>
(cherry picked from commit 942ea6487f59e52d88050fb8deb8a2e6c0ca83c3)
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