From: Xuehan Xu Date: Thu, 27 Feb 2025 03:38:07 +0000 (+0800) Subject: crimson/so/seastore: clean up logical_child_node.cc X-Git-Tag: v20.0.0~22^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F62022%2Fhead;p=ceph.git crimson/so/seastore: clean up logical_child_node.cc logical_child_node.cc is totally duplicated with lba_mapping.cc and should be removed Signed-off-by: Xuehan Xu --- diff --git a/src/crimson/os/seastore/CMakeLists.txt b/src/crimson/os/seastore/CMakeLists.txt index 4aa075ec18e3a..1728afed2f922 100644 --- a/src/crimson/os/seastore/CMakeLists.txt +++ b/src/crimson/os/seastore/CMakeLists.txt @@ -1,7 +1,6 @@ set(crimson_seastore_srcs cached_extent.cc lba_mapping.cc - logical_child_node.cc seastore_types.cc segment_manager.cc segment_manager/ephemeral.cc diff --git a/src/crimson/os/seastore/logical_child_node.cc b/src/crimson/os/seastore/logical_child_node.cc deleted file mode 100644 index c07f7e44108d5..0000000000000 --- a/src/crimson/os/seastore/logical_child_node.cc +++ /dev/null @@ -1,45 +0,0 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- -// vim: ts=8 sw=2 smarttab - -#include "crimson/os/seastore/logical_child_node.h" -#include "crimson/os/seastore/lba_mapping.h" - -namespace crimson::os::seastore { - -std::ostream &operator<<(std::ostream &out, const LBAMapping &rhs) -{ - out << "LBAMapping(" << rhs.get_key() - << "~0x" << std::hex << rhs.get_length() << std::dec - << "->" << rhs.get_val(); - if (rhs.is_indirect()) { - out << ",indirect(" << rhs.get_intermediate_base() - << "~0x" << std::hex << rhs.get_intermediate_length() - << "@0x" << rhs.get_intermediate_offset() << std::dec - << ")"; - } - out << ")"; - return out; -} - -std::ostream &operator<<(std::ostream &out, const lba_pin_list_t &rhs) -{ - bool first = true; - out << '['; - for (const auto &i: rhs) { - out << (first ? "" : ",") << *i; - first = false; - } - return out << ']'; -} - -LBAMappingRef LBAMapping::duplicate() const { - auto ret = _duplicate(ctx); - ret->range = range; - ret->value = value; - ret->parent = parent; - ret->len = len; - ret->pos = pos; - return ret; -} - -} // namespace crimson::os::seastore