]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crimson/os/seastore/async_cleaner: fix incorrect get_num_rolls() 58020/head
authorYingxin Cheng <yingxin.cheng@intel.com>
Mon, 27 May 2024 02:16:41 +0000 (10:16 +0800)
committerMatan Breizman <mbreizma@redhat.com>
Thu, 13 Jun 2024 12:28:03 +0000 (15:28 +0300)
commitc62bd2c8a60b30927864c238b9620f3adf001c4f
tree3a4d631b43dd8e971e387b0ee8377e4aee1d8023
parent8068d81b8f8cb8f0568309051bfd549537347a30
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>
(cherry picked from commit 5ae59cf52159bdc1ad3637da8654524cb7b4b4b6)
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