]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/os/seastore: update journal tail when writting the segment header in mkfs
authorYingxin Cheng <yingxin.cheng@intel.com>
Fri, 22 Jul 2022 06:18:56 +0000 (14:18 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Fri, 22 Jul 2022 09:32:20 +0000 (17:32 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/os/seastore/async_cleaner.h
src/crimson/os/seastore/journal/segment_allocator.cc
src/crimson/os/seastore/transaction_manager.cc

index ba44faef840ae87ffb10790c99570c52622032d2..7c2bae392bfd2983447cdc2243fef1da61d098df 100644 (file)
@@ -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);
 
index 1d11155f94858b17bb2117e1ca5733bd42e5da85..0b22f3ad8784e1489a0228b049c51256d4e98b6a 100644 (file)
@@ -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);
index 4a70b501570c5f058c40fe7f88271d4c75f1eb46..308346136947c977ea5b5cbdeb5475415e2b53db 100644 (file)
@@ -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(