Skip to content

Commit 927c29a

Browse files
committed
crimson/os/seastore/seastore_types: rename record_t::type to trans_type
In order to introduce a different type. Signed-off-by: Yingxin Cheng <[email protected]>
1 parent d17c681 commit 927c29a

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ void RecordSubmitter::account_submission(
493493
stats.record_batch_stats.increment(rg.get_size());
494494

495495
for (const record_t& r : rg.records) {
496-
auto src = r.type;
496+
auto src = r.trans_type;
497497
assert(is_modify_transaction(src));
498498
auto& trans_stats = get_by_src(stats.stats_by_src, src);
499499
++(trans_stats.num_records);

src/crimson/os/seastore/seastore_types.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ std::ostream &operator<<(std::ostream& out, const record_size_t& rsize)
441441
std::ostream &operator<<(std::ostream& out, const record_t& r)
442442
{
443443
return out << "record_t("
444-
<< "type=" << r.type
444+
<< "trans_type=" << r.trans_type
445445
<< ", num_extents=" << r.extents.size()
446446
<< ", num_deltas=" << r.deltas.size()
447447
<< ", modify_time=" << sea_time_point_printer_t{r.modify_time}
@@ -552,7 +552,7 @@ ceph::bufferlist encode_records(
552552

553553
for (auto& r: record_group.records) {
554554
record_header_t rheader{
555-
r.type,
555+
r.trans_type,
556556
(extent_len_t)r.deltas.size(),
557557
(extent_len_t)r.extents.size(),
558558
timepoint_to_mod(r.modify_time)

src/crimson/os/seastore/seastore_types.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1917,17 +1917,17 @@ struct record_size_t {
19171917
std::ostream &operator<<(std::ostream&, const record_size_t&);
19181918

19191919
struct record_t {
1920-
transaction_type_t type = TRANSACTION_TYPE_NULL;
1920+
transaction_type_t trans_type = TRANSACTION_TYPE_NULL;
19211921
std::vector<extent_t> extents;
19221922
std::vector<delta_info_t> deltas;
19231923
record_size_t size;
19241924
sea_time_point modify_time = NULL_TIME;
19251925

1926-
record_t(transaction_type_t type) : type{type} { }
1926+
record_t(transaction_type_t t_type) : trans_type{t_type} { }
19271927

19281928
// unit test only
19291929
record_t() {
1930-
type = transaction_type_t::MUTATE;
1930+
trans_type = transaction_type_t::MUTATE;
19311931
}
19321932

19331933
// unit test only
@@ -1940,7 +1940,7 @@ struct record_t {
19401940
for (auto& d: _deltas) {
19411941
push_back(std::move(d));
19421942
}
1943-
type = transaction_type_t::MUTATE;
1943+
trans_type = transaction_type_t::MUTATE;
19441944
}
19451945

19461946
bool is_empty() const {

0 commit comments

Comments
 (0)