]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd, seastore: fix log argument mismatches in error paths
authorKefu Chai <k.chai@proxmox.com>
Tue, 16 Jun 2026 12:34:05 +0000 (20:34 +0800)
committerKefu Chai <k.chai@proxmox.com>
Wed, 17 Jun 2026 08:54:51 +0000 (16:54 +0800)
two log calls in errorator continuations were missing an argument. the
compile-time fmt check surfaced these as a confusing "call to immediate
function ... is not a constant expression" deep in the errorator/composer
machinery rather than a plain "too few arguments", because the consteval
format failure escalates through the continuation templates:

- shard_services.cc handle_pg_create_info(): "ignore pgid {}" never
  passed pgid.
- node.cc: the read_extent error handler logged "{} -- addr={},
  is_level_tail={}" without the leading error; pass the std::error_code
  and include <fmt/std.h> for its formatter.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
src/crimson/os/seastore/onode_manager/staged-fltree/node.cc
src/crimson/osd/shard_services.cc

index 9d78d87a8cde8b9787a139b5098ba69fc7467b8f..6145018240f00fdb24223a3a2e92e02388fdcd9e 100644 (file)
@@ -7,6 +7,8 @@
 #include <exception>
 #include <sstream>
 
+#include <fmt/std.h>  // for fmt::formatter<std::error_code>
+
 #include "common/likely.h"
 #include "crimson/common/utility.h"
 #include "crimson/os/seastore/logging.h"
@@ -693,7 +695,7 @@ eagain_ifuture<Ref<Node>> Node::load(
     crimson::ct_error::all_same_way(
       [FNAME, c, addr, expect_is_level_tail](const auto &e) {
       ERRORT("{} -- addr={}, is_level_tail={}",
-        c.t, addr, expect_is_level_tail);
+        c.t, e, addr, expect_is_level_tail);
       ceph_abort();
       return eagain_iertr::make_ready_future<NodeExtentRef>();
     })
index bfb75e645ea846e892735cc665518bf0f4bb435b..abeeb439c0b9c740f19418281021c1c0544910ac 100644 (file)
@@ -933,7 +933,7 @@ seastar::future<Ref<PG>> ShardServices::handle_pg_create_info(
          const spg_t &pgid = info->pgid;
          if (!get_map()->is_up_acting_osd_shard(pgid, local_state.whoami)
              || !startmap->is_up_acting_osd_shard(pgid, local_state.whoami)) {
-           DEBUG("ignore pgid {}, doesn't exist anymore, discarding");
+           DEBUG("ignore pgid {}, doesn't exist anymore, discarding", pgid);
            local_state.pg_map.pg_creation_canceled(pgid);
            return seastar::make_ready_future<
              std::tuple<Ref<PG>, OSDMapService::cached_map_t>