From 2fef9223745b34e241ae3f8f1389dcd42390f7b5 Mon Sep 17 00:00:00 2001 From: Yingxin Cheng Date: Thu, 20 Jun 2024 15:31:56 +0800 Subject: [PATCH] crimson/os/seastore/seastore_types: rename record_t::type to trans_type In order to introduce a different type. Signed-off-by: Yingxin Cheng (cherry picked from commit 927c29a177648c7e71fe5e78d34dc0b76343a09e) --- src/crimson/os/seastore/journal/record_submitter.cc | 2 +- src/crimson/os/seastore/seastore_types.cc | 4 ++-- src/crimson/os/seastore/seastore_types.h | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/crimson/os/seastore/journal/record_submitter.cc b/src/crimson/os/seastore/journal/record_submitter.cc index d7ae299d699..309142113db 100644 --- a/src/crimson/os/seastore/journal/record_submitter.cc +++ b/src/crimson/os/seastore/journal/record_submitter.cc @@ -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); diff --git a/src/crimson/os/seastore/seastore_types.cc b/src/crimson/os/seastore/seastore_types.cc index 7699bc37367..1a5d3d3c83c 100644 --- a/src/crimson/os/seastore/seastore_types.cc +++ b/src/crimson/os/seastore/seastore_types.cc @@ -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) diff --git a/src/crimson/os/seastore/seastore_types.h b/src/crimson/os/seastore/seastore_types.h index 14ba07b2e0b..2b3cf60868f 100644 --- a/src/crimson/os/seastore/seastore_types.h +++ b/src/crimson/os/seastore/seastore_types.h @@ -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 extents; std::vector 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 { -- 2.39.5