]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/.../transaction_manager: convert clone_pin to coroutine
authorSamuel Just <sjust@redhat.com>
Thu, 16 Oct 2025 00:54:26 +0000 (00:54 +0000)
committerSamuel Just <sjust@redhat.com>
Mon, 5 Jan 2026 21:14:58 +0000 (13:14 -0800)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/os/seastore/transaction_manager.h

index 3ebc12b1c83fb6aaaf08fefcc870c4bddcd49fad..98437b593a066a8a12246b7a9fbdfbe40a3edc38 100644 (file)
@@ -566,30 +566,19 @@ public:
     LOG_PREFIX(TransactionManager::clone_pin);
     SUBDEBUGT(seastore_tm, "{} clone to hint {} ... pos={}, updateref={}",
       t, mapping, hint, pos, updateref);
-    return seastar::do_with(
+    pos = co_await pos.refresh();
+    mapping = co_await mapping.refresh();
+    auto ret = co_await lba_manager->clone_mapping(
+      t,
       std::move(pos),
       std::move(mapping),
-      [offset, len, FNAME, this, &t, hint, updateref](auto &pos, auto &mapping) {
-      return pos.refresh(
-      ).si_then([&pos, &mapping](auto m) {
-       pos = std::move(m);
-       return mapping.refresh();
-      }).si_then([offset, len, FNAME, this, &pos,
-                 &t, hint, updateref](auto mapping) {
-       return lba_manager->clone_mapping(
-         t,
-         std::move(pos),
-         std::move(mapping),
-         hint,
-         offset,
-         len,
-         updateref
-       ).si_then([FNAME, &t](auto ret) {
-         SUBDEBUGT(seastore_tm, "cloned as {}", t, ret.cloned_mapping);
-         return ret;
-       });
-      });
-    });
+      hint,
+      offset,
+      len,
+      updateref
+    );
+    SUBDEBUGT(seastore_tm, "cloned as {}", t, ret.cloned_mapping);
+    co_return ret;
   }
 
   struct clone_range_ret_t {