]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/tools: Remove usage of at_exit()
authorAishwarya Mathuria <amathuri@redhat.com>
Mon, 30 Jun 2025 13:53:54 +0000 (13:53 +0000)
committerAishwarya Mathuria <amathuri@redhat.com>
Mon, 14 Jul 2025 07:45:22 +0000 (07:45 +0000)
at_exit() is deprecated in seastar. Make use of deferred_stop instead.

Signed-off-by: Aishwarya Mathuria <amathuri@redhat.com>
src/crimson/tools/perf_staged_fltree.cc

index a55ee7704f0f3284ca724643bf770d8fdb539ba1..869a6488dab29be82fbd28953026dce6ad09325b 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <seastar/core/app-template.hh>
 #include <seastar/core/thread.hh>
+#include <seastar/util/closeable.hh>
 
 #include "crimson/common/config_proxy.h"
 #include "crimson/common/log.h"
@@ -116,15 +117,11 @@ seastar::future<> run(const bpo::variables_map& config) {
 
     using crimson::common::sharded_conf;
     sharded_conf().start(EntityName{}, std::string_view{"ceph"}).get();
-    seastar::engine().at_exit([] {
-      return sharded_conf().stop();
-    });
+    auto sharded_conf_stop = seastar::deferred_stop(sharded_conf());
 
     using crimson::common::sharded_perf_coll;
     sharded_perf_coll().start().get();
-    seastar::engine().at_exit([] {
-      return sharded_perf_coll().stop();
-    });
+    auto sharded_perf_stop = seastar::deferred_stop(sharded_perf_coll());
 
     auto kvs = KVPool<test_item_t>::create_raw_range(
         ns_sizes, oid_sizes, onode_sizes,