template <typename FormatContext>
auto format(const seastar::lowres_system_clock::time_point& t,
- FormatContext& ctx) {
+ FormatContext& ctx) const {
std::time_t tt = std::chrono::duration_cast<std::chrono::seconds>(
t.time_since_epoch()).count();
auto milliseconds = (t.time_since_epoch() %
#include "auth/RotatingKeyRing.h"
#include "common/hostname.h"
+#include "include/utime_fmt.h"
#include "crimson/auth/KeyRing.h"
#include "crimson/common/config_proxy.h"
return std::make_optional(auth_result_t::canceled);
}
logger().info("do_auth_single: {} returns {}: {}",
- *conn, *m, m->result);
+ *conn, *m, (int)m->result);
auto p = m->result_bl.cbegin();
auto ret = auth->handle_response(m->result, p,
nullptr, nullptr);
Ref<MAuthReply> m)
{
logger().info("handle_auth_reply {} returns {}: {}",
- conn, *m, m->result);
+ conn, *m, (int)m->result);
auto found = std::find_if(pending_conns.begin(), pending_conns.end(),
[peer_addr = conn.get_peer_addr()](auto& mc) {
return mc->is_my_peer(peer_addr);
reinterpret_cast<const preamble_block_t*>(bl.front().c_str());
logger().trace("{} SEND({}) frame: tag={}, num_segments={}, crc={}",
conn, bl.length(), (int)main_preamble->tag,
- (int)main_preamble->num_segments, main_preamble->crc);
+ (int)main_preamble->num_segments, (uint32_t)main_preamble->crc);
}
FrameAssemblerV2Ref FrameAssemblerV2::create(SocketConnection &conn)
auto ret = std::make_unique<Socket>(
std::move(socket), side_t::connector, 0, construct_tag{});
logger().debug("Socket::connect(): connected to {}, socket {}",
- peer_addr, fmt::ptr(ret));
+ peer_addr, fmt::ptr(ret.get()));
return ret;
});
}
peer_addr.get_port(), Socket::construct_tag{});
logger().debug("ShardedServerSocket({})::accept(): accepted peer {}, "
"socket {}, dispatch_only_on_primary_sid = {}",
- ss.listen_addr, peer_addr, fmt::ptr(_socket),
+ ss.listen_addr, peer_addr, fmt::ptr(_socket.get()),
ss.dispatch_only_on_primary_sid);
std::ignore = seastar::with_gate(
ss.shutdown_gate,
#include <tuple>
#include <boost/functional/hash.hpp>
#include <fmt/os.h>
+#include <fmt/std.h>
#include "auth/Auth.h"
#include "Errors.h"
#include "crimson/net/SocketMessenger.h"
#include "msg/Message.h"
#include "msg/msg_fmt.h"
+#include "include/utime_fmt.h"
using namespace ceph::msgr::v2;
using crimson::common::local_conf;
msg_frame.front_len(),
msg_frame.middle_len(),
msg_frame.data_len(),
- current_header.type,
+ (uint16_t)current_header.type,
conn.get_peer_name(),
- current_header.data_off,
- current_header.seq);
+ (uint16_t)current_header.data_off,
+ (uint32_t)current_header.seq);
ceph_msg_header header{current_header.seq,
current_header.tid,
logger().debug("{} <== #{},{} === {} ({})",
conn,
message->get_seq(),
- current_header.ack_seq,
+ (uint32_t)current_header.ack_seq,
*message,
message->get_type());
}
}
template <typename FormatContext>
- auto format(crimson::net::io_handler_state state, FormatContext& ctx) {
+ auto format(crimson::net::io_handler_state state, FormatContext& ctx) const {
return fmt::format_to(
ctx.out(),
"io(in_seq={}, is_out_queued={}, has_out_sent={})",
struct fmt::formatter<crimson::net::IOHandler::io_state_t>
: fmt::formatter<std::string_view> {
template <typename FormatContext>
- auto format(crimson::net::IOHandler::io_state_t state, FormatContext& ctx) {
+ auto format(crimson::net::IOHandler::io_state_t state, FormatContext& ctx) const {
using enum crimson::net::IOHandler::io_state_t;
std::string_view name;
switch (state) {
#include <fmt/format.h>
#include <fmt/os.h>
+#include <fmt/std.h>
#include "crimson/os/seastore/logging.h"
#include "crimson/os/seastore/async_cleaner.h"
using node_delta_op_t = crimson::os::seastore::onode::node_delta_op_t;
// parse is inherited from formatter<string_view>.
template <typename FormatContext>
- auto format(node_delta_op_t op, FormatContext& ctx) {
+ auto format(node_delta_op_t op, FormatContext& ctx) const {
std::string_view name = "unknown";
switch (op) {
case node_delta_op_t::INSERT:
// (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92944).
template <HasDoFormatTo T> struct formatter<T> : formatter<std::string_view> {
template <typename FormatContext>
- auto format(const T& staged_iterator, FormatContext& ctx) {
+ auto format(const T& staged_iterator, FormatContext& ctx) const {
return staged_iterator.do_format_to(ctx.out(), true);
}
};
using op_type_t = crimson::os::seastore::op_type_t;
// parse is inherited from formatter<string_view>.
template <typename FormatContext>
- auto format(op_type_t op, FormatContext& ctx) {
+ auto format(op_type_t op, FormatContext& ctx) const {
std::string_view name = "unknown";
switch (op) {
case op_type_t::TRANSACTION:
{
LOG_PREFIX(SeaStore::Shard::_do_transaction_step);
auto op = i.decode_op();
- SUBTRACET(seastore_t, "got op {}", *ctx.transaction, op->op);
+ SUBTRACET(seastore_t, "got op {}", *ctx.transaction, (uint32_t)op->op);
using ceph::os::Transaction;
if (op->op == Transaction::OP_NOP)
template <> struct fmt::formatter<segment_state_t>: fmt::formatter<std::string_view> {
// parse is inherited from formatter<string_view>.
template <typename FormatContext>
- auto format(segment_state_t s, FormatContext& ctx) {
+ auto format(segment_state_t s, FormatContext& ctx) const {
std::string_view name = "unknown";
switch (s) {
case segment_state_t::EMPTY:
}
-struct obj_scrub_progress_t {
- // nullopt once complete
- std::optional<uint64_t> offset = 0;
- ceph::buffer::hash data_hash{std::numeric_limits<uint32_t>::max()};
-
- bool header_done = false;
- std::optional<std::string> next_key;
- bool keys_done = false;
- ceph::buffer::hash omap_hash{std::numeric_limits<uint32_t>::max()};
-};
ScrubScan::ifut<> ScrubScan::deep_scan_object(
PG &pg,
const ghobject_t &obj)
}
-template <>
-struct fmt::formatter<crimson::osd::obj_scrub_progress_t> {
- constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); }
- template <typename FormatContext>
- auto format(const crimson::osd::obj_scrub_progress_t &progress,
- FormatContext& ctx)
- {
- return fmt::format_to(
- ctx.out(),
- "obj_scrub_progress_t(offset: {}, "
- "header_done: {}, next_key: {}, keys_done: {})",
- progress.offset, progress.header_done,
- progress.next_key, progress.keys_done);
- }
-};
ifut<> run(PG &pg) final;
};
+struct obj_scrub_progress_t {
+ // nullopt once complete
+ std::optional<uint64_t> offset = 0;
+ ceph::buffer::hash data_hash{std::numeric_limits<uint32_t>::max()};
+
+ bool header_done = false;
+ std::optional<std::string> next_key;
+ bool keys_done = false;
+ ceph::buffer::hash omap_hash{std::numeric_limits<uint32_t>::max()};
+};
+
}
namespace crimson {
}
+template <>
+struct fmt::formatter<crimson::osd::obj_scrub_progress_t> {
+ constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); }
+ template <typename FormatContext>
+ auto format(const crimson::osd::obj_scrub_progress_t &progress,
+ FormatContext& ctx) const
+ {
+ return fmt::format_to(
+ ctx.out(),
+ "obj_scrub_progress_t(offset: {}, "
+ "header_done: {}, next_key: {}, keys_done: {})",
+ progress.offset.has_value() ? *progress.offset : 0,
+ progress.header_done,
+ progress.next_key.has_value() ? *progress.next_key : "",
+ progress.keys_done);
+ }
+};
+
#if FMT_VERSION >= 90000
template <> struct fmt::formatter<crimson::osd::ScrubRequested>
: fmt::ostream_formatter {};
#include <boost/range/numeric.hpp>
#include <fmt/format.h>
#include <fmt/ostream.h>
+#include "include/utime_fmt.h"
#include "common/hobject.h"
if (m->pg_roll_forward_to != eversion_t())
op_roll_forward_to = m->pg_roll_forward_to;
logger().debug("op_trim_to = {}, op_roll_forward_to = {}",
- op_trim_to, op_roll_forward_to);
+ op_trim_to.has_value() ? *op_trim_to : eversion_t(),
+ op_roll_forward_to.has_value() ? *op_roll_forward_to : eversion_t());
peering_state.append_log_entries_update_missing(
m->entries, t, op_trim_to, op_roll_forward_to);
#include <boost/range/algorithm/copy.hpp>
#include <fmt/format.h>
#include <fmt/ostream.h>
+#include "include/utime_fmt.h"
#include <seastar/core/print.hh>
#include "messages/MOSDOp.h"
adjusted_length = adjusted_size - offset;
}
logger().trace("sparse_read: {} {}~{}",
- os.oi.soid, op.extent.offset, op.extent.length);
+ os.oi.soid, (uint64_t)op.extent.offset, (uint64_t)op.extent.length);
return interruptor::make_interruptible(store->fiemap(coll, ghobject_t{os.oi.soid},
offset, adjusted_length)).safe_then_interruptible(
[&delta_stats, &os, &osd_op, this](auto&& m) {
ceph::encode(extents, osd_op.outdata);
encode_destructively(bl, osd_op.outdata);
logger().trace("sparse_read got {} bytes from object {}",
- osd_op.op.extent.length, os.oi.soid);
+ (uint64_t)osd_op.op.extent.length, os.oi.soid);
delta_stats.num_rd++;
delta_stats.num_rd_kb += shift_round_up(osd_op.op.extent.length, 10);
return read_errorator::make_ready_future<>();
auto& checksum = osd_op.op.checksum;
if (read_bl.length() != checksum.length) {
logger().warn("checksum: bytes read {} != {}",
- read_bl.length(), checksum.length);
+ read_bl.length(), (uint64_t)checksum.length);
return crimson::ct_error::invarg::make();
}
// calculate its checksum and put the result in outdata
default:
return seastar::make_exception_future<>(
std::invalid_argument(fmt::format("invalid request type: {}",
- m->get_header().type)));
+ (uint16_t)m->get_header().type)));
}
}
constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); }
template <typename FormatContext>
- auto format(const auto &range, FormatContext& ctx)
+ auto format(const auto &range, FormatContext& ctx) const
{
return fmt::format_to(
ctx.out(),
seastar::future<> Watch::connect(crimson::net::ConnectionXcoreRef conn, bool)
{
if (this->conn == conn) {
- logger().debug("conn={} already connected", conn);
+ logger().debug("conn={} already connected", *conn);
return seastar::now();
}
timeout_timer.cancel();