mirror of
https://github.com/ceph/ceph
synced 2025-02-21 01:47:25 +00:00
osd: formatter for pg_log_op_return_item_t
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
This commit is contained in:
parent
4f5356d062
commit
6590e56b42
@ -4223,6 +4223,16 @@ struct pg_log_op_return_item_t {
|
||||
}
|
||||
};
|
||||
WRITE_CLASS_ENCODER(pg_log_op_return_item_t)
|
||||
namespace fmt {
|
||||
template <>
|
||||
struct formatter<pg_log_op_return_item_t> {
|
||||
constexpr auto parse(fmt::format_parse_context& ctx) { return ctx.begin(); }
|
||||
template <typename FormatContext>
|
||||
auto format(const pg_log_op_return_item_t& litm, FormatContext& ctx) const {
|
||||
return fmt::format_to(ctx.out(), "r={}+{}b", litm.rval, litm.bl.length());
|
||||
}
|
||||
};
|
||||
} // namespace fmt
|
||||
|
||||
/**
|
||||
* pg_log_entry_t - single entry/event in pg log
|
||||
|
@ -329,7 +329,6 @@ struct fmt::formatter<ScrubMap> {
|
||||
};
|
||||
|
||||
#if FMT_VERSION >= 90000
|
||||
template <> struct fmt::formatter<pg_log_op_return_item_t> : fmt::ostream_formatter {};
|
||||
template <> struct fmt::formatter<watch_info_t> : fmt::ostream_formatter {};
|
||||
template <bool TrackChanges> struct fmt::formatter<pg_missing_set<TrackChanges>> : fmt::ostream_formatter {};
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user