From: Yingxin Cheng Date: Fri, 22 Jul 2022 06:18:56 +0000 (+0800) Subject: crimson/os/seastore: update journal tail when writting the segment header in mkfs X-Git-Tag: v18.0.0~426^2~9 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=6f074b6c1ef0cefe6dda178f6d822c8da23b2f74;p=ceph-ci.git crimson/os/seastore: update journal tail when writting the segment header in mkfs Signed-off-by: Yingxin Cheng --- diff --git a/src/crimson/os/seastore/async_cleaner.h b/src/crimson/os/seastore/async_cleaner.h index ba44faef840..7c2bae392bf 100644 --- a/src/crimson/os/seastore/async_cleaner.h +++ b/src/crimson/os/seastore/async_cleaner.h @@ -812,12 +812,6 @@ public: void update_journal_tails( journal_seq_t dirty_tail, journal_seq_t alloc_tail) final; - void init_mkfs() { - ceph_assert(disable_trim || journal_head != JOURNAL_SEQ_NULL); - journal_alloc_tail = journal_head; - journal_dirty_tail = journal_head; - } - using release_ertr = SegmentManagerGroup::release_ertr; release_ertr::future<> maybe_release_segment(Transaction &t); diff --git a/src/crimson/os/seastore/journal/segment_allocator.cc b/src/crimson/os/seastore/journal/segment_allocator.cc index 1d11155f948..0b22f3ad878 100644 --- a/src/crimson/os/seastore/journal/segment_allocator.cc +++ b/src/crimson/os/seastore/journal/segment_allocator.cc @@ -68,6 +68,8 @@ SegmentAllocator::do_open(bool is_mkfs) }; dirty_tail = mkfs_seq; alloc_tail = mkfs_seq; + segment_provider.update_journal_tails( + dirty_tail, alloc_tail); } else { ceph_assert(dirty_tail != JOURNAL_SEQ_NULL); ceph_assert(alloc_tail != JOURNAL_SEQ_NULL); diff --git a/src/crimson/os/seastore/transaction_manager.cc b/src/crimson/os/seastore/transaction_manager.cc index 4a70b501570..30834613694 100644 --- a/src/crimson/os/seastore/transaction_manager.cc +++ b/src/crimson/os/seastore/transaction_manager.cc @@ -49,7 +49,6 @@ TransactionManager::mkfs_ertr::future<> TransactionManager::mkfs() ).safe_then([this] { return journal->open_for_mkfs(); }).safe_then([this](auto) { - async_cleaner->init_mkfs(); return epm->open(); }).safe_then([this, FNAME]() { return with_transaction_intr(