From: Jason Dillaman Date: Fri, 12 May 2017 20:43:44 +0000 (-0400) Subject: blkin: librados should start new child trace X-Git-Tag: v12.1.0~10^2~67^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6ce2656ead3c463ba43cb6f45f7a416310f4db9a;p=ceph.git blkin: librados should start new child trace Signed-off-by: Jason Dillaman --- diff --git a/src/librados/IoCtxImpl.cc b/src/librados/IoCtxImpl.cc index 4102df1c0ddd..d0d5a1ae5078 100644 --- a/src/librados/IoCtxImpl.cc +++ b/src/librados/IoCtxImpl.cc @@ -770,7 +770,7 @@ int librados::IoCtxImpl::aio_operate_read(const object_t &oid, AioCompletionImpl *c, int flags, bufferlist *pbl, - const blkin_trace_info *trace_info) + const blkin_trace_info *trace_info) { FUNCTRACE(); Context *oncomplete = new C_aio_Complete(c); @@ -782,8 +782,10 @@ int librados::IoCtxImpl::aio_operate_read(const object_t &oid, c->io = this; ZTracer::Trace trace; - if (trace_info) - trace.init("rados operate read", &objecter->trace_endpoint, trace_info); + if (trace_info) { + ZTracer::Trace parent_trace("", nullptr, trace_info); + trace.init("rados operate read", &objecter->trace_endpoint, &parent_trace); + } trace.event("init root span"); Objecter::Op *objecter_op = objecter->prepare_read_op(oid, oloc, @@ -798,7 +800,7 @@ int librados::IoCtxImpl::aio_operate_read(const object_t &oid, int librados::IoCtxImpl::aio_operate(const object_t& oid, ::ObjectOperation *o, AioCompletionImpl *c, const SnapContext& snap_context, int flags, - const blkin_trace_info *trace_info) + const blkin_trace_info *trace_info) { FUNCTRACE(); OID_EVENT_TRACE(oid.name.c_str(), "RADOS_WRITE_OP_BEGIN"); @@ -816,8 +818,10 @@ int librados::IoCtxImpl::aio_operate(const object_t& oid, queue_aio_write(c); ZTracer::Trace trace; - if (trace_info) - trace.init("rados operate", &objecter->trace_endpoint, trace_info); + if (trace_info) { + ZTracer::Trace parent_trace("", nullptr, trace_info); + trace.init("rados operate", &objecter->trace_endpoint, &parent_trace); + } trace.event("init root span"); Objecter::Op *op = objecter->prepare_mutate_op(