From e0097bc12e48bf952d6a0a412a55cd2af8803e24 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 19 Jun 2009 23:27:04 -0700 Subject: [PATCH] osd: do NOT include op vector when shipping raw transaction This just doubles up the data payload. And makes the MOSDSubOp printout look like garbage, since e.g. the setxattr names are taken from the portion of the data payload encoding the transaction. --- src/messages/MOSDSubOp.h | 2 +- src/osd/ReplicatedPG.cc | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/messages/MOSDSubOp.h b/src/messages/MOSDSubOp.h index 63a172fad8a08..b20162c76cb9f 100644 --- a/src/messages/MOSDSubOp.h +++ b/src/messages/MOSDSubOp.h @@ -72,7 +72,7 @@ public: ::decode(pgid, p); ::decode(poid, p); - unsigned num_ops; + __u32 num_ops; ::decode(num_ops, p); ops.resize(num_ops); unsigned off = 0; diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index c8b0aa06544c2..679e2cf4bc8b2 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -1680,7 +1680,6 @@ void ReplicatedPG::issue_repop(RepGather *repop, int dest, utime_t now, wr->get_data() = repop->ctx->op->get_data(); // _copy_ bufferlist } else { // ship resulting transaction, log entries, and pg_stats - wr->ops = repop->ctx->ops; // just fyi ::encode(repop->ctx->op_t, wr->get_data()); ::encode(repop->ctx->log, wr->logbl); wr->pg_stats = info.stats; @@ -2045,8 +2044,10 @@ void ReplicatedPG::sub_op_modify(MOSDSubOp *op) const char *opname; if (op->noop) opname = "no-op"; - else + else if (op->ops.size()) opname = ceph_osd_op_name(op->ops[0].op.op); + else + opname = "trans"; dout(10) << "sub_op_modify " << opname << " " << soid -- 2.39.5