]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crimson/os/seastore/async_cleaner: fix incorrect get_num_rolls() 57711/head
authorYingxin Cheng <yingxin.cheng@intel.com>
Mon, 27 May 2024 02:16:41 +0000 (10:16 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Mon, 27 May 2024 07:07:33 +0000 (15:07 +0800)
commit5ae59cf52159bdc1ad3637da8654524cb7b4b4b6
tree3dd8422a821f588a0391d393bef4409431c711fd
parentfb2023ea3ce7330b26dca83abd2791d3747bf26b
crimson/os/seastore/async_cleaner: fix incorrect get_num_rolls()

The number of journal segments should not be based on the committed
journal_head. Otherwise, if a new journal segment is just opened and the
committed journal_head hasn't been updated, the result will be wrong.

This causes ceph_assert(get_segments_reclaimable() == 0) in
SegmentCleaner::get_next_reclaim_segment().

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/os/seastore/async_cleaner.cc
src/crimson/os/seastore/async_cleaner.h
src/test/crimson/seastore/test_btree_lba_manager.cc
src/test/crimson/seastore/test_cbjournal.cc
src/test/crimson/seastore/test_seastore_journal.cc