Skip to content

Commit

Permalink
crimson/os/seastore: move implementation to seastore_types.cc
Browse files Browse the repository at this point in the history
Signed-off-by: Yingxin Cheng <[email protected]>
  • Loading branch information
cyx1231st committed Dec 9, 2021
1 parent 91f46e7 commit 76b1d35
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
21 changes: 0 additions & 21 deletions src/crimson/os/seastore/journal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,6 @@ namespace {

namespace crimson::os::seastore {

std::ostream &operator<<(std::ostream &out, const segment_header_t &header)
{
return out << "segment_header_t("
<< "segment_seq=" << header.journal_segment_seq
<< ", physical_segment_id=" << header.physical_segment_id
<< ", journal_tail=" << header.journal_tail
<< ", segment_nonce=" << header.segment_nonce
<< ", out-of-line=" << header.out_of_line
<< ")";
}


std::ostream &operator<<(std::ostream &out, const extent_info_t &info)
{
return out << "extent_info_t("
<< " type: " << info.type
<< " addr: " << info.addr
<< " len: " << info.len
<< ")";
}

segment_nonce_t generate_nonce(
segment_seq_t seq,
const seastore_meta_t &meta)
Expand Down
20 changes: 20 additions & 0 deletions src/crimson/os/seastore/seastore_types.cc
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,26 @@ std::ostream &operator<<(std::ostream &lhs, const delta_info_t &rhs)
<< ")";
}

std::ostream &operator<<(std::ostream &out, const extent_info_t &info)
{
return out << "extent_info_t("
<< "type: " << info.type
<< ", addr: " << info.addr
<< ", len: " << info.len
<< ")";
}

std::ostream &operator<<(std::ostream &out, const segment_header_t &header)
{
return out << "segment_header_t("
<< "segment_seq=" << header.journal_segment_seq
<< ", physical_segment_id=" << header.physical_segment_id
<< ", journal_tail=" << header.journal_tail
<< ", segment_nonce=" << header.segment_nonce
<< ", out-of-line=" << header.out_of_line
<< ")";
}

void record_size_t::account_extent(extent_len_t extent_len)
{
assert(extent_len);
Expand Down

0 comments on commit 76b1d35

Please sign in to comment.