]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
core: Handle OP_TOUCH_TEMP in BlueStore without any guard(WITH_CRIMSON) 69428/head
authorMohit Agrawal <moagrawa@redhat.com>
Fri, 12 Jun 2026 01:59:18 +0000 (07:29 +0530)
committerMohit Agrawal <moagrawa@redhat.com>
Tue, 30 Jun 2026 09:31:12 +0000 (15:01 +0530)
During backfill recovery on Crimson OSD replica, Bluestore
aborts with _txc_add_transaction error ENOENT on operation
due to OP_TOUCH_TEMP. OP_TOUCH_TEMP is guarded by #ifdef WITH_CRIMSON
but WITH_CRIMSON is not defined when BlueStore is compiled.

OP_TOUCH_TEMP is a crimson specific op to manage temporary
objects and the op is not used by classic osd. It is a plain
integer constant defined in the shared transaction layer so
adding it to the common code path in Transaction.h and BlueStore.cc
requires no additional includes or compile time guards.Handling
it unconditonally is therefore safe for all Objectstore backends.

Solution: Handle OP_TOUCH_TEMP without any guard

Fixes: https://tracker.ceph.com/issues/75957
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
src/os/Transaction.cc
src/os/Transaction.h
src/os/bluestore/BlueStore.cc

index 960dfd301910011c11f1d7bf265774fd376c7390..21539e9117143aa9e69f1dea37206969b5e6328f 100644 (file)
@@ -87,7 +87,6 @@ void Transaction::dump(ceph::Formatter *f)
       }
       break;
 
-#ifdef WITH_CRIMSON
     case Transaction::OP_TOUCH_TEMP:
       {
         coll_t cid = i.get_cid(op->cid);
@@ -99,7 +98,6 @@ void Transaction::dump(ceph::Formatter *f)
         f->dump_stream("oid") << dest_oid;
       }
       break;
-#endif
 
     case Transaction::OP_WRITE:
       {
index d4c3623addd55df61519acd9631b63099de86b13..220e701f45dc87dcde87ec999fd2cb8bb3f0a7f5 100644 (file)
@@ -153,9 +153,7 @@ public:
     OP_COLL_SET_BITS = 42, // cid, bits
 
     OP_MERGE_COLLECTION = 43, // cid, destination
-#ifdef WITH_CRIMSON
     OP_TOUCH_TEMP = 44, // cid, temp_oid, target_oid
-#endif
   };
 
   // Transaction hint type
@@ -442,9 +440,7 @@ public:
       op->oid = om[op->oid];
       break;
 
-#ifdef WITH_CRIMSON
     case OP_TOUCH_TEMP:
-#endif
     case OP_CLONERANGE2:
     case OP_CLONE:
       ceph_assert(op->cid < cm.size());
@@ -862,7 +858,6 @@ public:
     _op->oid = _get_object_id(oid);
     data.ops = data.ops + 1;
   }
-#ifdef WITH_CRIMSON
   /**
    * touch_temp
    *
@@ -884,7 +879,7 @@ public:
     _op->dest_oid = _get_object_id(target_oid);
     data.ops = data.ops + 1;
   }
-#endif
+
   /**
    * Write data to an offset within an object. If the object is too
    * small, it is expanded as needed.  It is possible to specify an
index bbfd74a2175a95ede3c56f582d1971e8f369c80b..1720efc3d5b2db202245beaef6c0afc317dcf8a0 100644 (file)
@@ -16226,9 +16226,7 @@ void BlueStore::_txc_add_transaction(TransContext *txc, Transaction *t)
     // these operations implicity create the object
     bool create = false;
     if (op->op == Transaction::OP_TOUCH ||
-#ifdef WITH_CRIMSON
         op->op == Transaction::OP_TOUCH_TEMP ||
-#endif
        op->op == Transaction::OP_CREATE ||
        op->op == Transaction::OP_WRITE ||
        op->op == Transaction::OP_ZERO) {
@@ -16252,9 +16250,7 @@ void BlueStore::_txc_add_transaction(TransContext *txc, Transaction *t)
     switch (op->op) {
     case Transaction::OP_CREATE:
     case Transaction::OP_TOUCH:
-#ifdef WITH_CRIMSON
     case Transaction::OP_TOUCH_TEMP:
-#endif
       r = _touch(txc, c, o);
       break;