]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: reduce unnecessary indentation level in PGAdvanceMap::start()
authorRadosław Zarzyński <rzarzyns@redhat.com>
Fri, 15 Apr 2022 14:48:10 +0000 (16:48 +0200)
committerRadosław Zarzyński <rzarzyns@redhat.com>
Thu, 5 May 2022 02:06:31 +0000 (04:06 +0200)
Signed-off-by: Radosław Zarzyński <rzarzyns@redhat.com>
src/crimson/osd/osd_operations/pg_advance_map.cc

index a96479d4076e79584edbe56ed1c27b88089ece44..5257b7ce4dc7b3f884af8caf1958743adda2af5a 100644 (file)
@@ -58,40 +58,40 @@ seastar::future<> PGAdvanceMap::start()
   IRef ref = this;
   return with_blocking_future(
     handle.enter(pg->peering_request_pg_pipeline.process))
-    .then([this] {
-      if (do_init) {
-       pg->handle_initialize(rctx);
-       pg->handle_activate_map(rctx);
-      }
-      return seastar::do_for_each(
-       boost::make_counting_iterator(from + 1),
-       boost::make_counting_iterator(to + 1),
-       [this](epoch_t next_epoch) {
-         return osd.get_map(next_epoch).then(
-           [this] (cached_map_t&& next_map) {
-             pg->handle_advance_map(next_map, rctx);
-           });
-       }).then([this] {
-         pg->handle_activate_map(rctx);
-         handle.exit();
-         if (do_init) {
-           osd.pg_map.pg_created(pg->get_pgid(), pg);
-           osd.shard_services.inc_pg_num();
-           logger().info("PGAdvanceMap::start new pg {}", *pg);
-         }
-         return seastar::when_all_succeed(
-           pg->get_need_up_thru() \
-              ? osd.shard_services.send_alive(pg->get_same_interval_since())
-              : seastar::now(),
-           osd.shard_services.dispatch_context(
-             pg->get_collection_ref(),
-             std::move(rctx)));
-       }).then_unpack([this] {
-          return osd.shard_services.send_pg_temp();
-        });
-    }).then([this, ref=std::move(ref)] {
-      logger().debug("{}: complete", *this);
-    });
+  .then([this] {
+    if (do_init) {
+      pg->handle_initialize(rctx);
+      pg->handle_activate_map(rctx);
+    }
+    return seastar::do_for_each(
+      boost::make_counting_iterator(from + 1),
+      boost::make_counting_iterator(to + 1),
+      [this](epoch_t next_epoch) {
+        return osd.get_map(next_epoch).then(
+          [this] (cached_map_t&& next_map) {
+            pg->handle_advance_map(next_map, rctx);
+          });
+      }).then([this] {
+        pg->handle_activate_map(rctx);
+        handle.exit();
+        if (do_init) {
+          osd.pg_map.pg_created(pg->get_pgid(), pg);
+          osd.shard_services.inc_pg_num();
+          logger().info("PGAdvanceMap::start new pg {}", *pg);
+        }
+        return seastar::when_all_succeed(
+          pg->get_need_up_thru() \
+            ? osd.shard_services.send_alive(pg->get_same_interval_since())
+            : seastar::now(),
+          osd.shard_services.dispatch_context(
+            pg->get_collection_ref(),
+            std::move(rctx)));
+      }).then_unpack([this] {
+        return osd.shard_services.send_pg_temp();
+      });
+  }).then([this, ref=std::move(ref)] {
+    logger().debug("{}: complete", *this);
+  });
 }
 
 }