mirror of
https://github.com/ceph/ceph
synced 2026-08-02 07:03:18 +00:00
crimson/osd/ec_backend: add missing break in transaction translation
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>
This commit is contained in:
parent
94bf1d7087
commit
853968f367
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user