]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/os/seastore/transaction: rename ool_block_lists
authorYingxin Cheng <yingxin.cheng@intel.com>
Mon, 22 Jul 2024 02:33:47 +0000 (10:33 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Tue, 6 Aug 2024 03:06:05 +0000 (11:06 +0800)
Drop the inaccurate written_ prefix because they may be still writting
when added to the lists.

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/os/seastore/cache.cc
src/crimson/os/seastore/transaction.h

index 74688d8db22b54a8bd21a8bc43a7268eaaf440e8..fcc3507f9d9498009a15f12cc60c016676df974e 100644 (file)
@@ -1322,7 +1322,7 @@ record_t Cache::prepare_record(
     }
   }
 
-  for (auto &i: t.written_ool_block_list) {
+  for (auto &i: t.ool_block_list) {
     TRACET("fresh ool extent -- {}", t, *i);
     ceph_assert(i->is_valid());
     assert(!i->is_inline());
@@ -1340,7 +1340,7 @@ record_t Cache::prepare_record(
     }
   }
 
-  for (auto &i: t.written_inplace_ool_block_list) {
+  for (auto &i: t.inplace_ool_block_list) {
     if (!i->is_valid()) {
       continue;
     }
@@ -1422,13 +1422,13 @@ record_t Cache::prepare_record(
 
   ceph_assert(t.get_fresh_block_stats().num ==
               t.inline_block_list.size() +
-              t.written_ool_block_list.size() +
+              t.ool_block_list.size() +
               t.num_delayed_invalid_extents +
              t.num_allocated_invalid_extents);
 
   auto& ool_stats = t.get_ool_write_stats();
-  ceph_assert(ool_stats.extents.num == t.written_ool_block_list.size() +
-    t.written_inplace_ool_block_list.size());
+  ceph_assert(ool_stats.extents.num == t.ool_block_list.size() +
+    t.inplace_ool_block_list.size());
 
   if (record.is_empty()) {
     SUBINFOT(seastore_t,
index d7cdb30098a0fe34693fd93233d5b64f6564f032..ed9e93e02fb09966be5456cd355bb3430bd28bbe 100644 (file)
@@ -198,7 +198,7 @@ public:
   }
 
   void mark_delayed_extent_ool(CachedExtentRef& ref) {
-    written_ool_block_list.push_back(ref);
+    ool_block_list.push_back(ref);
   }
 
   void update_delayed_ool_extent_addr(LogicalCachedExtentRef& ref,
@@ -214,13 +214,13 @@ public:
   void mark_allocated_extent_ool(CachedExtentRef& ref) {
     assert(ref->get_paddr().is_absolute());
     assert(!ref->is_inline());
-    written_ool_block_list.push_back(ref);
+    ool_block_list.push_back(ref);
   }
 
   void mark_inplace_rewrite_extent_ool(LogicalCachedExtentRef ref) {
     assert(ref->get_paddr().is_absolute());
     assert(!ref->is_inline());
-    written_inplace_ool_block_list.push_back(ref);
+    inplace_ool_block_list.push_back(ref);
   }
 
   void add_inplace_rewrite_extent(CachedExtentRef ref) {
@@ -332,7 +332,7 @@ public:
 
   template <typename F>
   auto for_each_finalized_fresh_block(F &&f) const {
-    std::for_each(written_ool_block_list.begin(), written_ool_block_list.end(), f);
+    std::for_each(ool_block_list.begin(), ool_block_list.end(), f);
     std::for_each(inline_block_list.begin(), inline_block_list.end(), f);
   }
 
@@ -410,8 +410,8 @@ public:
     num_allocated_invalid_extents = 0;
     delayed_alloc_list.clear();
     inline_block_list.clear();
-    written_ool_block_list.clear();
-    written_inplace_ool_block_list.clear();
+    ool_block_list.clear();
+    inplace_ool_block_list.clear();
     pre_alloc_list.clear();
     pre_inplace_rewrite_list.clear();
     retired_set.clear();
@@ -555,7 +555,7 @@ private:
    * Contains a reference (without a refcount) to every extent mutated
    * as part of *this.  No contained extent may be referenced outside
    * of *this.  Every contained extent will be in one of inline_block_list,
-   * written_ool_block_list or/and pre_alloc_list, mutated_block_list,
+   * ool_block_list or/and pre_alloc_list, mutated_block_list,
    * or delayed_alloc_list.
    */
   ExtentIndex write_set;
@@ -566,20 +566,23 @@ private:
   io_stat_t fresh_block_stats;
   uint64_t num_delayed_invalid_extents = 0;
   uint64_t num_allocated_invalid_extents = 0;
-  /// fresh blocks with delayed allocation, may become inline or ool below
+  /// fresh blocks with delayed allocation,
+  /// may become inline_block_list or ool_block_list below
   std::list<CachedExtentRef> delayed_alloc_list;
   /// fresh blocks with pre-allocated addresses with RBM,
-  /// should be released upon conflicts, will be added to ool below
+  /// should be released upon conflicts,
+  /// will be added to ool_block_list below
   std::list<CachedExtentRef> pre_alloc_list;
-  /// dirty blocks for inplace rewrite with RBM, will be added to inplace ool below
+  /// dirty blocks for inplace rewrite with RBM,
+  /// will be added to inplace inplace_ool_block_list below
   std::list<LogicalCachedExtentRef> pre_inplace_rewrite_list;
 
   /// fresh blocks that will be committed with inline journal record
   std::list<CachedExtentRef> inline_block_list;
   /// fresh blocks that will be committed with out-of-line record
-  std::list<CachedExtentRef> written_ool_block_list;
+  std::list<CachedExtentRef> ool_block_list;
   /// dirty blocks that will be committed out-of-line with inplace rewrite
-  std::list<LogicalCachedExtentRef> written_inplace_ool_block_list;
+  std::list<LogicalCachedExtentRef> inplace_ool_block_list;
 
   /// list of mutated blocks, holds refcounts, subset of write_set
   std::list<CachedExtentRef> mutated_block_list;