]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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)
committerYingxin Cheng <yingxin.cheng@intel.com>
Tue, 25 Jun 2024 07:37:58 +0000 (15:37 +0800)
In order to introduce a different type.

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

index 1e54470ff83bc8c4ac61f64552cdfbf4ffa0b6af..d784c33cfc36837d2e3a1a8a9f178283501bf546 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 da5be9e733e44758c9aad859547cf9ce3ebba9c3..cc1c1ca9f4414f4b51e5052cb24ad92ae1bb4e25 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 31f074159a202c2c117e695ee5e8b48d09e8ff2b..966c90704eed7e1896b3c58ba38549ce6d9e2da3 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 {