]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/osd/object_context: consider clones found as long as they're in
authorXuehan Xu <xuxuehan@qianxin.com>
Tue, 18 Jul 2023 06:14:50 +0000 (14:14 +0800)
committerXuehan Xu <xuxuehan@qianxin.com>
Tue, 18 Jul 2023 06:14:50 +0000 (14:14 +0800)
SnapSet::clones

Fixes: https://tracker.ceph.com/issues/61825
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
src/crimson/osd/object_context_loader.cc

index 939ce536822db9d52fd7510b1f446c8e2120f8ac..0a4d74c0d70c7e51e9c4185975b4dd208313ced1 100644 (file)
@@ -98,14 +98,13 @@ using crimson::common::local_conf;
           crimson::ct_error::enoent::make()
         };
       }
-      auto coid = resolve_oid(head->get_head_ss(), oid);
-      if (!coid) {
-        ERRORDPP("clone {} not found", dpp, oid);
-        return load_obc_iertr::future<>{
-          crimson::ct_error::enoent::make()
-        };
-      }
-      auto [clone, existed] = obc_registry.get_cached_obc(*coid);
+#ifndef NDEBUG
+      auto &ss = head->get_head_ss();
+      auto cit = std::find(
+       std::begin(ss.clones), std::end(ss.clones), oid.snap);
+      assert(cit != std::end(ss.clones));
+#endif
+      auto [clone, existed] = obc_registry.get_cached_obc(oid);
       return clone->template with_lock<State, IOInterruptCondition>(
         [existed=existed, clone=std::move(clone),
          func=std::move(func), head=std::move(head), this]()