]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/os/seastore/cache: rename try_construct_record to prepare_record
authorYingxin Cheng <yingxin.cheng@intel.com>
Wed, 30 Jun 2021 06:03:29 +0000 (14:03 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Thu, 1 Jul 2021 02:16:43 +0000 (10:16 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/os/seastore/cache.cc
src/crimson/os/seastore/cache.h
src/crimson/os/seastore/transaction_manager.cc
src/test/crimson/seastore/test_btree_lba_manager.cc
src/test/crimson/seastore/test_seastore_cache.cc

index 68782dfafcf8c1cd5ea657237655b0bc91d4e0f8..e1e557baf40bea8652779d7db14019d5e67d92cf 100644 (file)
@@ -252,9 +252,9 @@ CachedExtentRef Cache::duplicate_for_write(
   return ret;
 }
 
-record_t Cache::try_construct_record(Transaction &t)
+record_t Cache::prepare_record(Transaction &t)
 {
-  LOG_PREFIX(Cache::try_construct_record);
+  LOG_PREFIX(Cache::prepare_record);
   DEBUGT("enter", t);
 
   // Should be valid due to interruptible future
index 071bc7e9c1036844c9d54e2c675acbc0e246a102..943975963d4b522b11fe1f7e1e58fa2dc5c17148 100644 (file)
@@ -384,11 +384,11 @@ public:
   );
 
   /**
-   * try_construct_record
+   * prepare_record
    *
    * Construct the record for Journal from transaction.
    */
-  record_t try_construct_record(
+  record_t prepare_record(
     Transaction &t ///< [in, out] current transaction
   );
 
index 688e3e803970093535f3c09f55913df604d41414..603ffc49248fb9b9216dce1f42c2593b388888aa 100644 (file)
@@ -239,7 +239,7 @@ TransactionManager::submit_transaction_direct(
     tref.get_handle().enter(write_pipeline.prepare)
   ).then_interruptible([this, FNAME, &tref]() mutable
                       -> submit_transaction_iertr::future<> {
-    auto record = cache->try_construct_record(tref);
+    auto record = cache->prepare_record(tref);
 
     tref.get_handle().maybe_release_collection_lock();
 
index 175ca86eaff05a792a20c756d8f96633098895dd..596e8362f6bb96082c5369326c2ce6311c120df9 100644 (file)
@@ -58,7 +58,7 @@ struct btree_lba_manager_test :
 
   seastar::future<> submit_transaction(TransactionRef t)
   {
-    auto record = cache.try_construct_record(*t);
+    auto record = cache.prepare_record(*t);
     return journal.submit_record(std::move(record), t->get_handle()).safe_then(
       [this, t=std::move(t)](auto p) mutable {
        auto [addr, seq] = p;
index 09cf6dc0562bf65ed6cc48f0b4dc11b09f5ea6ac..42d285671e96be57da0728e9df265de75488ca11 100644 (file)
@@ -31,7 +31,7 @@ struct cache_test_t : public seastar_test_suite_t {
 
   seastar::future<paddr_t> submit_transaction(
     TransactionRef t) {
-    auto record = cache.try_construct_record(*t);
+    auto record = cache.prepare_record(*t);
 
     bufferlist bl;
     for (auto &&block : record.extents) {