]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd/ec_backend: add missing break in transaction translation
authorSun Yuechi <sunyuechi@iscas.ac.cn>
Wed, 1 Jul 2026 04:46:22 +0000 (12:46 +0800)
committerSun Yuechi <sunyuechi@iscas.ac.cn>
Wed, 1 Jul 2026 04:46:22 +0000 (12:46 +0800)
ECCrimsonOp::transate_transaction() lacked a break after OP_OMAP_CLEAR
and OP_CLONERANGE2, so both cases fell through to the next one.

OP_OMAP_CLEAR fell into OP_OMAP_SETKEYS, which decodes an attrset from
the transaction iterator that OP_OMAP_CLEAR never encoded, corrupting
the decode stream for every following op.

OP_CLONERANGE2 fell into OP_CLONE; clone_range() had already marked the
destination op non-empty, so the following clone() trips
ceph_assert(op.is_none() || op.is_delete()).

Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
src/crimson/osd/ec_backend.cc

index 4ce37c77920eea886782ebbe11ee4eb9baef4be3..dec93eaf087bf5328b05985e413a01a5944b3ee9 100644 (file)
@@ -160,6 +160,7 @@ struct ECCrimsonOp : ECCommon::RMWPipeline::Op {
        break;
       case ceph::os::Transaction::OP_OMAP_CLEAR:
        t_pg->omap_clear(i.get_oid(op->oid).hobj);
+       break;
       case ceph::os::Transaction::OP_OMAP_SETKEYS:
        {
        std::map<std::string, ceph::bufferlist> aset;
@@ -211,6 +212,7 @@ struct ECCrimsonOp : ECCommon::RMWPipeline::Op {
                          op->off,
                          op->len,
                          op->dest_off);
+       break;
       case ceph::os::Transaction::OP_CLONE:
        t_pg->clone(i.get_oid(op->dest_oid).hobj, i.get_oid(op->oid).hobj);
         break;