Bug: https://tracker.ceph.com/issues/53820
Bug-Debian: https://bugs.debian.org/
1003469
Forwarded: no
Last-Update: 2022-01-14
+ changes in segment_manager.cc and segment_manager.h are backported from
part of the large changes in https://github.com/ceph/ceph/commit/
d5b0cd13
+ change in node_extent_accessor.h is not forwarded to upstream since it's
a workaround. However it doesn't harm since it's just a error message
which shouldn't happen anyway.
Gbp-Pq: Name fix-build-with-fmt-8.1.1.patch
add_library(crimson-seastore STATIC
cached_extent.cc
seastore_types.cc
+ segment_manager.cc
segment_manager/ephemeral.cc
segment_manager/block.cc
transaction_manager.cc
}
default:
logger().error("OTree::Extent::Replay: got unknown op {} when replay {:#x}",
- op, node.get_laddr());
+ static_cast<uint8_t>(op), node.get_laddr());
ceph_abort();
}
} catch (buffer::error& e) {
--- /dev/null
+#include "crimson/os/seastore/segment_manager.h"
+
+namespace crimson::os::seastore {
+
+ std::ostream& operator<<(std::ostream &out, Segment::segment_state_t s)
+ {
+ using state_t = Segment::segment_state_t;
+ switch (s) {
+ case state_t::EMPTY:
+ return out << "EMPTY";
+ case state_t::OPEN:
+ return out << "OPEN";
+ case state_t::CLOSED:
+ return out << "CLOSED";
+ default:
+ return out << "INVALID_SEGMENT_STATE!";
+ }
+ }
+}
virtual ~Segment() {}
};
+
+std::ostream& operator<<(std::ostream& out, Segment::segment_state_t);
+
using SegmentRef = boost::intrusive_ptr<Segment>;
constexpr size_t PADDR_SIZE = sizeof(paddr_t);