]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/ReplicatedPG: claim the read buffer instead of copying it 5402/head
authorKefu Chai <kchai@redhat.com>
Tue, 28 Jul 2015 09:54:08 +0000 (17:54 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 28 Jul 2015 09:54:08 +0000 (17:54 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/osd/ReplicatedPG.cc

index dcd11f5553f293e0a575573baa78b7f7c29ed176..4b8c2eb0316c8d6f74da71d9ffbec2e22dfc1ae7 100644 (file)
@@ -3605,8 +3605,8 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
 
         op.extent.length = total_read;
 
-        ::encode(m, osd_op.outdata);
-        ::encode(data_bl, osd_op.outdata);
+        ::encode_destructively(bl, osd_op.outdata);
+        ::encode_destructively(data_bl, osd_op.outdata);
 
        ctx->delta_stats.num_rd_kb += SHIFT_ROUND_UP(op.extent.length, 10);
        ctx->delta_stats.num_rd++;