]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/osd/osd_types_fmt.h
import ceph quincy 17.2.4
[ceph.git] / ceph / src / osd / osd_types_fmt.h
index deac85c5a570c5395d3b27887d9f6f37d2d53b97..23c0e8a3b81afff95c5058fb94d9e1f09394e010 100644 (file)
@@ -104,3 +104,14 @@ struct fmt::formatter<object_info_t> {
     return fmt::format_to(ctx.out(), ")");
   }
 };
+
+template <>
+struct fmt::formatter<pg_t> {
+  constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); }
+
+  template <typename FormatContext>
+  auto format(const pg_t& pg, FormatContext& ctx)
+  {
+    return fmt::format_to(ctx.out(), "{}.{:x}", pg.pool(), pg.m_seed);
+  }
+};