From: Sage Weil Date: Sat, 20 Jun 2009 06:27:04 +0000 (-0700) Subject: osd: do NOT include op vector when shipping raw transaction X-Git-Tag: v0.10~190 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e0097bc12e48bf952d6a0a412a55cd2af8803e24;p=ceph.git 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. --- diff --git a/src/messages/MOSDSubOp.h b/src/messages/MOSDSubOp.h index 63a172fad8a0..b20162c76cb9 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 c8b0aa06544c..679e2cf4bc8b 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