#include <memory>
#include <string.h>
+#include <fmt/ostream.h>
#include "include/buffer.h"
class LogicalChildNode;
}
+namespace crimson::os::seastore::lba {
+struct LBALeafNode;
+}
+
+// declared ahead of the struct so the consteval {fmt} check sees it from
+// LBALeafNode's own inline logging methods.
+#if FMT_VERSION >= 90000
+template <> struct fmt::formatter<crimson::os::seastore::lba::LBALeafNode> : fmt::ostream_formatter {};
+#endif
+
namespace crimson::os::seastore::lba {
using LBANode = FixedKVNode<laddr_t>;
template <> struct fmt::formatter<crimson::os::seastore::lba::lba_node_meta_t> : fmt::ostream_formatter {};
template <> struct fmt::formatter<crimson::os::seastore::lba::lba_map_val_t> : fmt::ostream_formatter {};
template <> struct fmt::formatter<crimson::os::seastore::lba::LBAInternalNode> : fmt::ostream_formatter {};
-template <> struct fmt::formatter<crimson::os::seastore::lba::LBALeafNode> : fmt::ostream_formatter {};
template <> struct fmt::formatter<crimson::os::seastore::lba::LBACursor> : fmt::ostream_formatter {};
#endif
#include <utility>
#include <functional>
+#include <fmt/ostream.h>
+
#include "crimson/common/log.h"
#include "crimson/os/seastore/object_data_handler.h"
+// declared ahead of the logging functions below so the consteval {fmt}
+// check can see them at the call sites.
+#if FMT_VERSION >= 90000
+template <> struct fmt::formatter<crimson::os::seastore::overwrite_range_t>
+ : fmt::ostream_formatter {};
+template <> struct fmt::formatter<crimson::os::seastore::data_t>
+ : fmt::ostream_formatter {};
+template <> struct fmt::formatter<crimson::os::seastore::edge_t>
+ : fmt::ostream_formatter {};
+#endif
+
namespace {
seastar::logger& logger() {
return crimson::get_logger(ceph_subsys_seastore_odata);
} // namespace crimson::os::seastore
-#if FMT_VERSION >= 90000
-template <> struct fmt::formatter<crimson::os::seastore::overwrite_range_t>
- : fmt::ostream_formatter {};
-template <> struct fmt::formatter<crimson::os::seastore::data_t>
- : fmt::ostream_formatter {};
-template <> struct fmt::formatter<crimson::os::seastore::edge_t>
- : fmt::ostream_formatter {};
-#endif
#include "crimson/os/seastore/onode_manager/staged-fltree/node_extent_manager.h"
+#include <fmt/ostream.h>
+
/**
* dummy.h
*
* Dummy backend implementations for test purposes.
*/
+namespace crimson::os::seastore::onode {
+class DummyNodeExtent;
+}
+
+#if FMT_VERSION >= 90000
+template <> struct fmt::formatter<crimson::os::seastore::onode::DummyNodeExtent> : fmt::ostream_formatter {};
+#endif
+
namespace crimson::os::seastore::onode {
class DummySuper final: public Super {
};
}
-
-#if FMT_VERSION >= 90000
-template <> struct fmt::formatter<crimson::os::seastore::onode::DummyNodeExtent> : fmt::ostream_formatter {};
-#endif
#include <seastar/core/semaphore.hh>
#include <seastar/core/sharded.hh>
+#include <fmt/ostream.h>
+
#include "common/dout.h"
#include "common/ostream_temp.h"
#include "include/interval_set.h"
class FuturizedStore;
}
+namespace crimson::osd {
+class PG;
+}
+
+// declared ahead of the class so the consteval {fmt} check can see it from
+// PG's own inline logging methods (which format *this) above the class.
+#if FMT_VERSION >= 90000
+template <> struct fmt::formatter<crimson::osd::PG> : fmt::ostream_formatter {};
+#endif
+
namespace crimson::osd {
class OpsExecuter;
class SnapTrimEvent;
std::ostream& operator<<(std::ostream&, const PG& pg);
}
-
-#if FMT_VERSION >= 90000
-template <> struct fmt::formatter<crimson::osd::PG> : fmt::ostream_formatter {};
-#endif
#include "messages/MWatchNotify.h"
+#include <fmt/ostream.h>
+
namespace {
seastar::logger& logger() {
}
}
+namespace crimson::osd {
+class WatchTimeoutRequest;
+}
+
+#if FMT_VERSION >= 90000
+template <> struct fmt::formatter<crimson::osd::WatchTimeoutRequest> : fmt::ostream_formatter {};
+#endif
+
namespace crimson::osd {
// a watcher can remove itself if it has not seen a notification after a period of time.
}
} // namespace crimson::osd
-
-#if FMT_VERSION >= 90000
-template <> struct fmt::formatter<crimson::osd::WatchTimeoutRequest> : fmt::ostream_formatter {};
-#endif
#include "common/hobject.h"
#include "include/types_fmt.h"
+// formatter<osd_reqid_t> below formats req_id.name (entity_name_t), so its
+// formatter must be visible here, otherwise it gets instantiated before
+// msg_fmt.h is pulled in by a later include (explicit-specialization-after-
+// instantiation under compile-time {fmt} checking).
+#include "msg/msg_fmt.h"
#include "osd/osd_types.h"
#include <fmt/chrono.h>
#include <fmt/ranges.h>