]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
objecter: gift reply data to outbl _after_ demuxing
authorSage Weil <sage@newdream.net>
Wed, 18 Jan 2012 05:10:05 +0000 (21:10 -0800)
committerSage Weil <sage@newdream.net>
Wed, 18 Jan 2012 05:10:05 +0000 (21:10 -0800)
Divvy up the result bl first, then gift the whole shebang to outbl.  If
we gift it first, there's nothing to demux (since we move intead of copy
the bufferlist ptrs).

Signed-off-by: Sage Weil <sage@newdream.net>
src/osdc/Objecter.cc

index 8616882f10e731aa6459246b9ddfdda7f63962da..8a91e0dfa70b95efe050901b21000b6f684501f6 100644 (file)
@@ -1170,14 +1170,6 @@ void Objecter::handle_osd_op_reply(MOSDOpReply *m)
   if (op->reply_epoch)
     *op->reply_epoch = m->get_map_epoch();
 
-  // got data?
-  if (op->outbl) {
-    if (op->con)
-      op->con->revoke_rx_buffer(op->tid);
-    m->claim_data(*op->outbl);
-    op->outbl = 0;
-  }
-
   // per-op result demuxing
   vector<OSDOp> out_ops;
   m->claim_ops(out_ops);
@@ -1217,6 +1209,14 @@ void Objecter::handle_osd_op_reply(MOSDOpReply *m)
     logger->inc(l_osdc_op_commit);
   }
 
+  // got data?
+  if (op->outbl) {
+    if (op->con)
+      op->con->revoke_rx_buffer(op->tid);
+    m->claim_data(*op->outbl);
+    op->outbl = 0;
+  }
+
   // done with this tid?
   if (!op->onack && !op->oncommit) {
     op->session_item.remove_myself();