]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd/osd_operations: flatten indentation of InternalClientRequest
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 8 Nov 2022 13:55:37 +0000 (13:55 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 28 Feb 2023 16:22:04 +0000 (16:22 +0000)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/osd/osd_operations/internal_client_request.cc

index a1f2331770919bba439c17cdcb47ec085c5dbc9f..f15e434f8fd9b18356f2ef3794fdeeadbc692abf 100644 (file)
@@ -63,55 +63,53 @@ seastar::future<> InternalClientRequest::start()
           });
         }).then_interruptible([this] {
           return enter_stage<interruptor>(
-            pp().recover_missing
-          ).then_interruptible([this] {
-            return do_recover_missing(pg, get_target_oid());
-          }).then_interruptible([this] {
-            return enter_stage<interruptor>(
-              pp().get_obc
-            ).then_interruptible([this] () -> PG::load_obc_iertr::future<> {
-              logger().debug("{}: getting obc lock", *this);
-              return seastar::do_with(create_osd_ops(),
-                [this](auto& osd_ops) mutable {
-                logger().debug("InternalClientRequest: got {} OSDOps to execute",
-                               std::size(osd_ops));
-                [[maybe_unused]] const int ret = op_info.set_from_op(
-                  std::as_const(osd_ops), pg->get_pgid().pgid, *pg->get_osdmap());
-                assert(ret == 0);
-                return pg->with_locked_obc(get_target_oid(), op_info,
-                  [&osd_ops, this](auto obc) {
-                  return enter_stage<interruptor>(pp().process).then_interruptible(
-                    [obc=std::move(obc), &osd_ops, this] {
-                    return pg->do_osd_ops(
-                      std::move(obc),
-                      osd_ops,
-                      std::as_const(op_info),
-                      get_do_osd_ops_params(),
-                      [] {
-                        return PG::do_osd_ops_iertr::now();
-                      },
-                      [] (const std::error_code& e) {
-                        return PG::do_osd_ops_iertr::now();
-                      }
-                    ).safe_then_unpack_interruptible(
-                      [](auto submitted, auto all_completed) {
-                        return all_completed.handle_error_interruptible(
-                          crimson::ct_error::eagain::handle([] {
-                            return seastar::now();
-                          }));
-                      }, crimson::ct_error::eagain::handle([] {
-                        return interruptor::now();
-                      })
-                    );
-                  });
-                });
+            pp().recover_missing);
+        }).then_interruptible([this] {
+          return do_recover_missing(pg, get_target_oid());
+        }).then_interruptible([this] {
+          return enter_stage<interruptor>(
+            pp().get_obc);
+        }).then_interruptible([this] () -> PG::load_obc_iertr::future<> {
+          logger().debug("{}: getting obc lock", *this);
+          return seastar::do_with(create_osd_ops(),
+            [this](auto& osd_ops) mutable {
+            logger().debug("InternalClientRequest: got {} OSDOps to execute",
+                           std::size(osd_ops));
+            [[maybe_unused]] const int ret = op_info.set_from_op(
+              std::as_const(osd_ops), pg->get_pgid().pgid, *pg->get_osdmap());
+            assert(ret == 0);
+            return pg->with_locked_obc(get_target_oid(), op_info,
+              [&osd_ops, this](auto obc) {
+              return enter_stage<interruptor>(pp().process).then_interruptible(
+                [obc=std::move(obc), &osd_ops, this] {
+                return pg->do_osd_ops(
+                  std::move(obc),
+                  osd_ops,
+                  std::as_const(op_info),
+                  get_do_osd_ops_params(),
+                  [] {
+                    return PG::do_osd_ops_iertr::now();
+                  },
+                  [] (const std::error_code& e) {
+                    return PG::do_osd_ops_iertr::now();
+                  }
+                ).safe_then_unpack_interruptible(
+                  [](auto submitted, auto all_completed) {
+                    return all_completed.handle_error_interruptible(
+                      crimson::ct_error::eagain::handle([] {
+                        return seastar::now();
+                      }));
+                  }, crimson::ct_error::eagain::handle([] {
+                    return interruptor::now();
+                  })
+                );
               });
-            }).handle_error_interruptible(PG::load_obc_ertr::all_same_way([] {
-              return seastar::now();
-            })).then_interruptible([] {
-              return seastar::stop_iteration::yes;
             });
           });
+        }).handle_error_interruptible(PG::load_obc_ertr::all_same_way([] {
+          return seastar::now();
+        })).then_interruptible([] {
+          return seastar::stop_iteration::yes;
         });
       }, [this](std::exception_ptr eptr) {
         if (should_abort_request(*this, std::move(eptr))) {