]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/os/seastore/seastore_types: rename record_t::type to trans_type
authorYingxin Cheng <yingxin.cheng@intel.com>
Thu, 20 Jun 2024 07:31:56 +0000 (15:31 +0800)
committerMatan Breizman <mbreizma@redhat.com>
Thu, 25 Jul 2024 07:46:28 +0000 (10:46 +0300)
In order to introduce a different type.

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
(cherry picked from commit 927c29a177648c7e71fe5e78d34dc0b76343a09e)

src/crimson/os/seastore/journal/record_submitter.cc
src/crimson/os/seastore/seastore_types.cc
src/crimson/os/seastore/seastore_types.h

index d7ae299d6995c6868cba04a40d99f56ab3960a84..309142113db158ff6172727210af5509525b0fca 100644 (file)
@@ -493,7 +493,7 @@ void RecordSubmitter::account_submission(
   stats.record_batch_stats.increment(rg.get_size());
 
   for (const record_t& r : rg.records) {
-    auto src = r.type;
+    auto src = r.trans_type;
     assert(is_modify_transaction(src));
     auto& trans_stats = get_by_src(stats.stats_by_src, src);
     ++(trans_stats.num_records);
index 7699bc373675c0fe4f1551eadf86b08fee7247a1..1a5d3d3c83c79e8251cf53ea5aafce48f922b992 100644 (file)
@@ -441,7 +441,7 @@ std::ostream &operator<<(std::ostream& out, const record_size_t& rsize)
 std::ostream &operator<<(std::ostream& out, const record_t& r)
 {
   return out << "record_t("
-             << "type=" << r.type
+             << "trans_type=" << r.trans_type
              << ", num_extents=" << r.extents.size()
              << ", num_deltas=" << r.deltas.size()
              << ", modify_time=" << sea_time_point_printer_t{r.modify_time}
@@ -552,7 +552,7 @@ ceph::bufferlist encode_records(
 
   for (auto& r: record_group.records) {
     record_header_t rheader{
-      r.type,
+      r.trans_type,
       (extent_len_t)r.deltas.size(),
       (extent_len_t)r.extents.size(),
       timepoint_to_mod(r.modify_time)
index 14ba07b2e0b5a1ba4eeaa43a752cdecc85f536d0..2b3cf60868f858982bb7f5cced1c8942e45ab46a 100644 (file)
@@ -1917,17 +1917,17 @@ struct record_size_t {
 std::ostream &operator<<(std::ostream&, const record_size_t&);
 
 struct record_t {
-  transaction_type_t type = TRANSACTION_TYPE_NULL;
+  transaction_type_t trans_type = TRANSACTION_TYPE_NULL;
   std::vector<extent_t> extents;
   std::vector<delta_info_t> deltas;
   record_size_t size;
   sea_time_point modify_time = NULL_TIME;
 
-  record_t(transaction_type_t type) : type{type} { }
+  record_t(transaction_type_t t_type) : trans_type{t_type} { }
 
   // unit test only
   record_t() {
-    type = transaction_type_t::MUTATE;
+    trans_type = transaction_type_t::MUTATE;
   }
 
   // unit test only
@@ -1940,7 +1940,7 @@ struct record_t {
     for (auto& d: _deltas) {
       push_back(std::move(d));
     }
-    type = transaction_type_t::MUTATE;
+    trans_type = transaction_type_t::MUTATE;
   }
 
   bool is_empty() const {