From: Yingxin Date: Mon, 27 Nov 2017 10:02:25 +0000 (-0500) Subject: blkin: fix unconditional tracing X-Git-Tag: v13.0.1~74^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=072a25cd6ef33845823d380f662f661c3f6a30a3;p=ceph.git blkin: fix unconditional tracing 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 --- diff --git a/src/osd/ReplicatedBackend.cc b/src/osd/ReplicatedBackend.cc index 995010d21e1e..4c29f4abb283 100644 --- a/src/osd/ReplicatedBackend.cc +++ b/src/osd/ReplicatedBackend.cc @@ -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());