]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: do NOT include op vector when shipping raw transaction
authorSage Weil <sage@newdream.net>
Sat, 20 Jun 2009 06:27:04 +0000 (23:27 -0700)
committerSage Weil <sage@newdream.net>
Sat, 20 Jun 2009 06:27:04 +0000 (23:27 -0700)
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
src/osd/ReplicatedPG.cc

index 63a172fad8a08754a6e7e0a0e0fa9b9b58a1df05..b20162c76cb9f1cde4b8411f9b8106801aac992e 100644 (file)
@@ -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;
index c8b0aa06544c2f699c8b303c7e143fe9b580469e..679e2cf4bc8b20082a7251030a2979d8385ed53f 100644 (file)
@@ -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