]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
blkin: fix unconditional tracing 19156/head
authorYingxin <yingxin.cheng@intel.com>
Mon, 27 Nov 2017 10:02:25 +0000 (05:02 -0500)
committerYingxin <yingxin.cheng@intel.com>
Mon, 27 Nov 2017 10:14:11 +0000 (05:14 -0500)
Blkin trace will be triggered unconditionally at OSD `issue_op`, even if
op->pg_trace is not initialized. This issue introduces unnecessary
overhead and confusing tracing records when blkin tracing is ON.

Signed-off-by: Yingxin <yingxin.cheng@intel.com>
src/osd/ReplicatedBackend.cc

index 995010d21e1ed3441dba96fcd2233b7e069c7971..4c29f4abb283af4de793101cdacb10c432f7c985 100644 (file)
@@ -1042,7 +1042,7 @@ void ReplicatedBackend::issue_op(
       op_t,
       peer,
       pinfo);
-    if (op->op)
+    if (op->op && op->op->pg_trace)
       wr->trace.init("replicated op", nullptr, &op->op->pg_trace);
     get_parent()->send_message_osd_cluster(
       peer.osd, wr, get_osdmap()->get_epoch());