]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/os/seastore/transaction_manager: don't return invalid extent in get_extents_i...
authorYingxin Cheng <yingxin.cheng@intel.com>
Mon, 15 Aug 2022 03:31:41 +0000 (11:31 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Mon, 15 Aug 2022 03:34:51 +0000 (11:34 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/os/seastore/transaction_manager.cc

index f7a560829b8a1c9bbfbd2acba884fe701f10b204..5f8fce47c7c79a5fdde8ae7e1aba11b15d1d5510 100644 (file)
@@ -598,15 +598,15 @@ TransactionManager::get_extents_if_live(
        laddr,
        len
       ).si_then([=, &t](auto ret) {
+        std::list<CachedExtentRef> res;
         if (ret) {
           DEBUGT("{} {}~{} {} is live as physical extent -- {}",
                  t, type, laddr, len, paddr, *ret);
+          res.emplace_back(std::move(ret));
         } else {
           DEBUGT("{} {}~{} {} is not live as physical extent",
                  t, type, laddr, len, paddr);
         }
-       std::list<CachedExtentRef> res;
-       res.emplace_back(std::move(ret));
         return get_extents_if_live_ret(
          interruptible::ready_future_marker{},
          std::move(res));