]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: create temp recovering objects through touch_temp
authorXuehan Xu <xuxuehan@qianxin.com>
Wed, 22 Apr 2026 05:37:46 +0000 (13:37 +0800)
committerXuehan Xu <xuxuehan@qianxin.com>
Mon, 25 May 2026 08:55:32 +0000 (16:55 +0800)
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
src/crimson/osd/replicated_recovery_backend.cc

index a1f2f99caabfb6d5f86584627cde8f538dee1265..3448d3722b4b02078305413be5d87669b42d2696 100644 (file)
@@ -1232,7 +1232,14 @@ ReplicatedRecoveryBackend::prep_push_target(
   // create a new object
   if (!complete || !recovery_info.object_exist) {
     t->remove(coll->get_cid(), target_oid);
-    t->touch(coll->get_cid(), target_oid);
+    if (complete) {
+      t->touch(coll->get_cid(), target_oid);
+    } else {
+      t->touch_temp(
+        coll->get_cid(),
+        target_oid,
+        ghobject_t(recovery_info.soid));
+    }
     object_info_t oi;
     oi.decode(attrs.at(OI_ATTR));
     t->set_alloc_hint(coll->get_cid(), target_oid,