]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/common/smp_helpers: cleanup invoke_on_all_seq 63523/head
authorMatan Breizman <mbreizma@redhat.com>
Tue, 24 Jun 2025 10:25:36 +0000 (10:25 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Tue, 24 Jun 2025 10:26:06 +0000 (10:26 +0000)
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
src/crimson/common/smp_helpers.h

index 435b386821b42d91ba9d57abd2502795023aaa85..80d56b086ba0613440c1c44d9126fa2b1775bc4f 100644 (file)
@@ -21,6 +21,11 @@ namespace crimson {
 using core_id_t = seastar::shard_id;
 static constexpr core_id_t NULL_CORE = std::numeric_limits<core_id_t>::max();
 
+/**
+ * submit_to
+ *
+ * Transparently deal with vanilla and errorated futures
+ */
 auto submit_to(core_id_t core, auto &&f) {
   using ret_type = decltype(f());
   if constexpr (is_errorated_future_v<ret_type>) {
@@ -56,12 +61,7 @@ auto proxy_method_on_core(
 template <typename F>
 auto invoke_on_all_seq(F f) -> decltype(seastar::futurize_invoke(f)) {
   for (auto core: seastar::smp::all_cpus()) {
-    using ret_type = decltype(f());
-    if constexpr (is_errorated_future_v<ret_type>) {
       co_await crimson::submit_to(core, [&f] { return seastar::futurize_invoke(f);});
-    } else {
-      co_await seastar::smp::submit_to(core, [&f] { return seastar::futurize_invoke(f);});
-    }
   }
 }