From e0fc369455d7d7c6fdcb910fe0899ab2a2c241d2 Mon Sep 17 00:00:00 2001 From: Victor Araujo Date: Mon, 5 Sep 2016 00:48:33 +0200 Subject: [PATCH] blkin: pass trace information to object cacher Signed-off-by: Victor Araujo Signed-off-by: Jason Dillaman --- src/client/ObjecterWriteback.h | 5 +- src/librbd/ImageCtx.cc | 9 +-- src/librbd/ImageCtx.h | 6 +- src/librbd/LibrbdWriteback.cc | 11 ++-- src/librbd/LibrbdWriteback.h | 5 +- src/librbd/internal.cc | 2 +- src/librbd/io/ImageRequest.cc | 7 ++- src/osdc/ObjectCacher.cc | 58 ++++++++++++-------- src/osdc/ObjectCacher.h | 21 +++++-- src/osdc/WritebackHandler.h | 6 +- src/test/librbd/io/test_mock_ImageRequest.cc | 2 +- src/test/librbd/mock/MockImageCtx.h | 9 +-- src/test/osdc/FakeWriteback.cc | 6 +- src/test/osdc/FakeWriteback.h | 5 +- src/test/osdc/MemWriteback.cc | 6 +- src/test/osdc/MemWriteback.h | 5 +- 16 files changed, 101 insertions(+), 62 deletions(-) diff --git a/src/client/ObjecterWriteback.h b/src/client/ObjecterWriteback.h index 97cb228d5b8..ca76472adda 100644 --- a/src/client/ObjecterWriteback.h +++ b/src/client/ObjecterWriteback.h @@ -17,7 +17,8 @@ class ObjecterWriteback : public WritebackHandler { void read(const object_t& oid, uint64_t object_no, const object_locator_t& oloc, uint64_t off, uint64_t len, snapid_t snapid, bufferlist *pbl, uint64_t trunc_size, - __u32 trunc_seq, int op_flags, Context *onfinish) override { + __u32 trunc_seq, int op_flags, Context *onfinish, + ZTracer::Trace *trace) override { m_objecter->read_trunc(oid, oloc, off, len, snapid, pbl, 0, trunc_size, trunc_seq, new C_OnFinisher(new C_Lock(m_lock, onfinish), @@ -34,7 +35,7 @@ class ObjecterWriteback : public WritebackHandler { const SnapContext& snapc, const bufferlist &bl, ceph::real_time mtime, uint64_t trunc_size, __u32 trunc_seq, ceph_tid_t journal_tid, - Context *oncommit) override { + Context *oncommit, ZTracer::Trace *trace) override { return m_objecter->write_trunc(oid, oloc, off, len, snapc, bl, mtime, 0, trunc_size, trunc_seq, new C_OnFinisher(new C_Lock(m_lock, diff --git a/src/librbd/ImageCtx.cc b/src/librbd/ImageCtx.cc index 9ea00a1bcfb..8af0c5ef370 100644 --- a/src/librbd/ImageCtx.cc +++ b/src/librbd/ImageCtx.cc @@ -713,7 +713,7 @@ struct C_InvalidateCache : public Context { void ImageCtx::aio_read_from_cache(object_t o, uint64_t object_no, bufferlist *bl, size_t len, uint64_t off, Context *onfinish, - int fadvise_flags) { + int fadvise_flags, ZTracer::Trace *trace) { snap_lock.get_read(); ObjectCacher::OSDRead *rd = object_cacher->prepare_read(snap_id, bl, fadvise_flags); snap_lock.put_read(); @@ -722,7 +722,7 @@ struct C_InvalidateCache : public Context { extent.buffer_extents.push_back(make_pair(0, len)); rd->extents.push_back(extent); cache_lock.Lock(); - int r = object_cacher->readx(rd, object_set, onfinish); + int r = object_cacher->readx(rd, object_set, onfinish, trace); cache_lock.Unlock(); if (r != 0) onfinish->complete(r); @@ -730,7 +730,8 @@ struct C_InvalidateCache : public Context { void ImageCtx::write_to_cache(object_t o, const bufferlist& bl, size_t len, uint64_t off, Context *onfinish, - int fadvise_flags, uint64_t journal_tid) { + int fadvise_flags, uint64_t journal_tid, + ZTracer::Trace *trace) { snap_lock.get_read(); ObjectCacher::OSDWrite *wr = object_cacher->prepare_write( snapc, bl, ceph::real_time::min(), fadvise_flags, journal_tid); @@ -743,7 +744,7 @@ struct C_InvalidateCache : public Context { wr->extents.push_back(extent); { Mutex::Locker l(cache_lock); - object_cacher->writex(wr, object_set, onfinish); + object_cacher->writex(wr, object_set, onfinish, trace); } } diff --git a/src/librbd/ImageCtx.h b/src/librbd/ImageCtx.h index b85974224a8..96aee67f943 100644 --- a/src/librbd/ImageCtx.h +++ b/src/librbd/ImageCtx.h @@ -35,6 +35,8 @@ class PerfCounters; class ThreadPool; class SafeTimer; +namespace ZTracer { struct Trace; } + namespace librbd { class AsyncOperation; @@ -278,10 +280,10 @@ namespace librbd { uint64_t *overlap) const; void aio_read_from_cache(object_t o, uint64_t object_no, bufferlist *bl, size_t len, uint64_t off, Context *onfinish, - int fadvise_flags); + int fadvise_flags, ZTracer::Trace *trace); void write_to_cache(object_t o, const bufferlist& bl, size_t len, uint64_t off, Context *onfinish, int fadvise_flags, - uint64_t journal_tid); + uint64_t journal_tid, ZTracer::Trace *trace); void user_flushed(); void flush_cache(Context *onfinish); void shut_down_cache(Context *on_finish); diff --git a/src/librbd/LibrbdWriteback.cc b/src/librbd/LibrbdWriteback.cc index f9292caba2a..a30bc9adf72 100644 --- a/src/librbd/LibrbdWriteback.cc +++ b/src/librbd/LibrbdWriteback.cc @@ -196,7 +196,8 @@ namespace librbd { const object_locator_t& oloc, uint64_t off, uint64_t len, snapid_t snapid, bufferlist *pbl, uint64_t trunc_size, - __u32 trunc_seq, int op_flags, Context *onfinish) + __u32 trunc_seq, int op_flags, Context *onfinish, + ZTracer::Trace *trace) { // on completion, take the mutex and then call onfinish. Context *req = new C_ReadRequest(m_ictx->cct, onfinish, &m_lock); @@ -217,8 +218,9 @@ namespace librbd { librados::AioCompletion *rados_completion = util::create_rados_callback(req); - int r = m_ictx->data_ctx.aio_operate(oid.name, rados_completion, &op, - flags, NULL); + int r = m_ictx->data_ctx.aio_operate( + oid.name, rados_completion, &op, flags, nullptr, + (trace ? trace->get_info() : nullptr)); rados_completion->release(); assert(r >= 0); } @@ -254,7 +256,8 @@ namespace librbd { const bufferlist &bl, ceph::real_time mtime, uint64_t trunc_size, __u32 trunc_seq, ceph_tid_t journal_tid, - Context *oncommit) + Context *oncommit, + ZTracer::Trace *trace) { uint64_t object_no = oid_to_object_no(oid.name, m_ictx->object_prefix); diff --git a/src/librbd/LibrbdWriteback.h b/src/librbd/LibrbdWriteback.h index 9c47f98bc18..72db4dfa61b 100644 --- a/src/librbd/LibrbdWriteback.h +++ b/src/librbd/LibrbdWriteback.h @@ -24,7 +24,8 @@ namespace librbd { void read(const object_t& oid, uint64_t object_no, const object_locator_t& oloc, uint64_t off, uint64_t len, snapid_t snapid, bufferlist *pbl, uint64_t trunc_size, - __u32 trunc_seq, int op_flags, Context *onfinish) override; + __u32 trunc_seq, int op_flags, Context *onfinish, + ZTracer::Trace *trace) override; // Determine whether a read to this extent could be affected by a // write-triggered copy-on-write @@ -37,7 +38,7 @@ namespace librbd { const SnapContext& snapc, const bufferlist &bl, ceph::real_time mtime, uint64_t trunc_size, __u32 trunc_seq, ceph_tid_t journal_tid, - Context *oncommit) override; + Context *oncommit, ZTracer::Trace *trace) override; using WritebackHandler::write; void overwrite_extent(const object_t& oid, uint64_t off, diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc index 941c3ba5102..0c5a90bc0c3 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -2330,7 +2330,7 @@ int validate_pool(IoCtx &io_ctx, CephContext *cct) { ictx->readahead.inc_pending(); ictx->aio_read_from_cache(q->oid, q->objectno, NULL, q->length, q->offset, - req_comp, 0); + req_comp, 0, nullptr); } } ictx->perfcounter->inc(l_librbd_readahead); diff --git a/src/librbd/io/ImageRequest.cc b/src/librbd/io/ImageRequest.cc index e1a5ae1ca8b..b33f536b6c9 100644 --- a/src/librbd/io/ImageRequest.cc +++ b/src/librbd/io/ImageRequest.cc @@ -288,7 +288,8 @@ void ImageReadRequest::send_request() { req); image_ctx.aio_read_from_cache(extent.oid, extent.objectno, &req->data(), extent.length, - extent.offset, cache_comp, m_op_flags); + extent.offset, cache_comp, m_op_flags, + nullptr); } else { req->send(); } @@ -471,7 +472,7 @@ void ImageWriteRequest::send_object_cache_requests( C_AioRequest *req_comp = new C_AioRequest(aio_comp); image_ctx.write_to_cache(object_extent.oid, bl, object_extent.length, object_extent.offset, req_comp, m_op_flags, - journal_tid); + journal_tid, nullptr); } } @@ -776,7 +777,7 @@ void ImageWriteSameRequest::send_object_cache_requests( C_AioRequest *req_comp = new C_AioRequest(aio_comp); image_ctx.write_to_cache(object_extent.oid, bl, object_extent.length, object_extent.offset, req_comp, m_op_flags, - journal_tid); + journal_tid, nullptr); } } diff --git a/src/osdc/ObjectCacher.cc b/src/osdc/ObjectCacher.cc index 9a0b6ee2851..36633b0c5b4 100644 --- a/src/osdc/ObjectCacher.cc +++ b/src/osdc/ObjectCacher.cc @@ -65,16 +65,22 @@ class ObjectCacher::C_RetryRead : public Context { OSDRead *rd; ObjectSet *oset; Context *onfinish; + ZTracer::Trace r_trace; public: - C_RetryRead(ObjectCacher *_oc, OSDRead *r, ObjectSet *os, Context *c) - : oc(_oc), rd(r), oset(os), onfinish(c) {} + C_RetryRead(ObjectCacher *_oc, OSDRead *r, ObjectSet *os, Context *c, + ZTracer::Trace *trace) + : oc(_oc), rd(r), oset(os), onfinish(c) { + if (trace) { + r_trace = *trace; + } + } void finish(int r) override { if (r < 0) { if (onfinish) onfinish->complete(r); return; } - int ret = oc->_readx(rd, oset, onfinish, false); + int ret = oc->_readx(rd, oset, onfinish, false, &r_trace); if (ret != 0 && onfinish) { onfinish->complete(ret); } @@ -88,7 +94,7 @@ ObjectCacher::BufferHead *ObjectCacher::Object::split(BufferHead *left, ldout(oc->cct, 20) << "split " << *left << " at " << off << dendl; // split off right - ObjectCacher::BufferHead *right = new BufferHead(this); + ObjectCacher::BufferHead *right = new BufferHead(this, &left->b_trace); //inherit and if later access, this auto clean. right->set_dontneed(left->get_dontneed()); @@ -271,7 +277,8 @@ int ObjectCacher::Object::map_read(ObjectExtent &ex, map& hits, map& missing, map& rx, - map& errors) + map& errors, + ZTracer::Trace *trace) { assert(oc->lock.is_locked()); ldout(oc->cct, 10) << "map_read " << ex.oid @@ -286,7 +293,7 @@ int ObjectCacher::Object::map_read(ObjectExtent &ex, // at end? if (p == data.end()) { // rest is a miss. - BufferHead *n = new BufferHead(this); + BufferHead *n = new BufferHead(this, trace); n->set_start(cur); n->set_length(left); oc->bh_add(this, n); @@ -332,7 +339,7 @@ int ObjectCacher::Object::map_read(ObjectExtent &ex, } else if (p->first > cur) { // gap.. miss loff_t next = p->first; - BufferHead *n = new BufferHead(this); + BufferHead *n = new BufferHead(this, trace); loff_t len = MIN(next - cur, left); n->set_start(cur); n->set_length(len); @@ -396,7 +403,8 @@ void ObjectCacher::Object::audit_buffers() * other dirty data to left and/or right. */ ObjectCacher::BufferHead *ObjectCacher::Object::map_write(ObjectExtent &ex, - ceph_tid_t tid) + ceph_tid_t tid, + ZTracer::Trace *trace) { assert(oc->lock.is_locked()); BufferHead *final = 0; @@ -414,7 +422,7 @@ ObjectCacher::BufferHead *ObjectCacher::Object::map_write(ObjectExtent &ex, // at end ? if (p == data.end()) { if (final == NULL) { - final = new BufferHead(this); + final = new BufferHead(this, trace); replace_journal_tid(final, tid); final->set_start( cur ); final->set_length( max ); @@ -490,7 +498,7 @@ ObjectCacher::BufferHead *ObjectCacher::Object::map_write(ObjectExtent &ex, final->set_length(final->length() + glen); oc->bh_stat_add(final); } else { - final = new BufferHead(this); + final = new BufferHead(this, trace); replace_journal_tid(final, tid); final->set_start( cur ); final->set_length( glen ); @@ -741,7 +749,7 @@ void ObjectCacher::bh_read(BufferHead *bh, int op_flags) bh->ob->get_oloc(), bh->start(), bh->length(), bh->ob->get_snap(), &onfinish->bl, bh->ob->truncate_size, bh->ob->truncate_seq, - op_flags, onfinish); + op_flags, onfinish, &bh->b_trace); ++reads_outstanding; } @@ -1066,7 +1074,8 @@ void ObjectCacher::bh_write(BufferHead *bh) bh->snapc, bh->bl, bh->last_write, bh->ob->truncate_size, bh->ob->truncate_seq, - bh->journal_tid, oncommit); + bh->journal_tid, oncommit, + &bh->b_trace); ldout(cct, 20) << " tid " << tid << " on " << bh->ob->get_oid() << dendl; // set bh last_write_tid @@ -1290,13 +1299,14 @@ bool ObjectCacher::is_cached(ObjectSet *oset, vector& extents, * must delete it) * returns 0 if doing async read */ -int ObjectCacher::readx(OSDRead *rd, ObjectSet *oset, Context *onfinish) +int ObjectCacher::readx(OSDRead *rd, ObjectSet *oset, Context *onfinish, + ZTracer::Trace *trace) { - return _readx(rd, oset, onfinish, true); + return _readx(rd, oset, onfinish, true, trace); } int ObjectCacher::_readx(OSDRead *rd, ObjectSet *oset, Context *onfinish, - bool external_call) + bool external_call, ZTracer::Trace *trace) { assert(lock.is_locked()); bool success = true; @@ -1360,7 +1370,7 @@ int ObjectCacher::_readx(OSDRead *rd, ObjectSet *oset, Context *onfinish, ldout(cct, 10) << "readx waiting on tid " << o->last_write_tid << " on " << *o << dendl; o->waitfor_commit[o->last_write_tid].push_back( - new C_RetryRead(this,rd, oset, onfinish)); + new C_RetryRead(this,rd, oset, onfinish, trace)); // FIXME: perfcounter! return 0; } @@ -1389,7 +1399,7 @@ int ObjectCacher::_readx(OSDRead *rd, ObjectSet *oset, Context *onfinish, // map extent into bufferheads map hits, missing, rx, errors; - o->map_read(*ex_it, hits, missing, rx, errors); + o->map_read(*ex_it, hits, missing, rx, errors, trace); if (external_call) { // retry reading error buffers missing.insert(errors.begin(), errors.end()); @@ -1417,7 +1427,8 @@ int ObjectCacher::_readx(OSDRead *rd, ObjectSet *oset, Context *onfinish, << waitfor_read.size() << " blocked reads, " << (MAX(rx_bytes, max_size) - max_size) << " read bytes" << dendl; - waitfor_read.push_back(new C_RetryRead(this, rd, oset, onfinish)); + waitfor_read.push_back(new C_RetryRead(this, rd, oset, onfinish, + trace)); } bh_remove(o, bh_it->second); @@ -1436,7 +1447,7 @@ int ObjectCacher::_readx(OSDRead *rd, ObjectSet *oset, Context *onfinish, ldout(cct, 10) << "readx missed, waiting on " << *last->second << " off " << last->first << dendl; last->second->waitfor_read[last->first].push_back( - new C_RetryRead(this, rd, oset, onfinish) ); + new C_RetryRead(this, rd, oset, onfinish, trace) ); } @@ -1449,7 +1460,7 @@ int ObjectCacher::_readx(OSDRead *rd, ObjectSet *oset, Context *onfinish, ldout(cct, 10) << "readx missed, waiting on " << *bh_it->second << " off " << bh_it->first << dendl; bh_it->second->waitfor_read[bh_it->first].push_back( - new C_RetryRead(this, rd, oset, onfinish) ); + new C_RetryRead(this, rd, oset, onfinish, trace) ); } bytes_not_in_cache += bh_it->second->length(); success = false; @@ -1616,7 +1627,8 @@ void ObjectCacher::retry_waiting_reads() waitfor_read.splice(waitfor_read.end(), ls); } -int ObjectCacher::writex(OSDWrite *wr, ObjectSet *oset, Context *onfreespace) +int ObjectCacher::writex(OSDWrite *wr, ObjectSet *oset, Context *onfreespace, + ZTracer::Trace *trace) { assert(lock.is_locked()); ceph::real_time now = ceph::real_clock::now(); @@ -1634,7 +1646,7 @@ int ObjectCacher::writex(OSDWrite *wr, ObjectSet *oset, Context *onfreespace) ex_it->truncate_size, oset->truncate_seq); // map it all into a single bufferhead. - BufferHead *bh = o->map_write(*ex_it, wr->journal_tid); + BufferHead *bh = o->map_write(*ex_it, wr->journal_tid, trace); bool missing = bh->is_missing(); bh->snapc = wr->snapc; @@ -2017,7 +2029,7 @@ bool ObjectCacher::flush_set(ObjectSet *oset, Context *onfinish) // Buffer heads in dirty_or_tx_bh are sorted in ObjectSet/Object/offset // order. But items in oset->objects are not sorted. So the iterator can // point to any buffer head in the ObjectSet - BufferHead key(*oset->objects.begin()); + BufferHead key(*oset->objects.begin(), nullptr); it = dirty_or_tx_bh.lower_bound(&key); p = q = it; diff --git a/src/osdc/ObjectCacher.h b/src/osdc/ObjectCacher.h index a0305b65213..c6c49deb2b5 100644 --- a/src/osdc/ObjectCacher.h +++ b/src/osdc/ObjectCacher.h @@ -11,6 +11,7 @@ #include "common/Cond.h" #include "common/Finisher.h" #include "common/Thread.h" +#include "common/zipkin_trace.h" #include "Objecter.h" #include "Striper.h" @@ -130,9 +131,10 @@ class ObjectCacher { int error; // holds return value for failed reads map > waitfor_read; + ZTracer::Trace b_trace; // cons - explicit BufferHead(Object *o) : + explicit BufferHead(Object *o, ZTracer::Trace *trace) : state(STATE_MISSING), ref(0), dontneed(false), @@ -143,6 +145,9 @@ class ObjectCacher { journal_tid(0), error(0) { ex.start = ex.length = 0; + if (trace) { + b_trace = *trace; + } } // extent @@ -348,8 +353,10 @@ class ObjectCacher { map& hits, map& missing, map& rx, - map& errors); - BufferHead *map_write(ObjectExtent &ex, ceph_tid_t tid); + map& errors, + ZTracer::Trace *trace); + BufferHead *map_write(ObjectExtent &ex, ceph_tid_t tid, + ZTracer::Trace *trace); void replace_journal_tid(BufferHead *bh, ceph_tid_t tid); void truncate(loff_t s); @@ -547,7 +554,7 @@ class ObjectCacher { Cond read_cond; int _readx(OSDRead *rd, ObjectSet *oset, Context *onfinish, - bool external_call); + bool external_call, ZTracer::Trace *trace); void retry_waiting_reads(); public: @@ -597,8 +604,10 @@ class ObjectCacher { * @note total read size must be <= INT_MAX, since * the return value is total bytes read */ - int readx(OSDRead *rd, ObjectSet *oset, Context *onfinish); - int writex(OSDWrite *wr, ObjectSet *oset, Context *onfreespace); + int readx(OSDRead *rd, ObjectSet *oset, Context *onfinish, + ZTracer::Trace *trace = nullptr); + int writex(OSDWrite *wr, ObjectSet *oset, Context *onfreespace, + ZTracer::Trace *trace = nullptr); bool is_cached(ObjectSet *oset, vector& extents, snapid_t snapid); diff --git a/src/osdc/WritebackHandler.h b/src/osdc/WritebackHandler.h index c2835322341..4485f7e4605 100644 --- a/src/osdc/WritebackHandler.h +++ b/src/osdc/WritebackHandler.h @@ -15,7 +15,8 @@ class WritebackHandler { virtual void read(const object_t& oid, uint64_t object_no, const object_locator_t& oloc, uint64_t off, uint64_t len, snapid_t snapid, bufferlist *pbl, uint64_t trunc_size, - __u32 trunc_seq, int op_flags, Context *onfinish) = 0; + __u32 trunc_seq, int op_flags, Context *onfinish, + ZTracer::Trace *trace = nullptr) = 0; /** * check if a given extent read result may change due to a write * @@ -34,7 +35,8 @@ class WritebackHandler { const SnapContext& snapc, const bufferlist &bl, ceph::real_time mtime, uint64_t trunc_size, __u32 trunc_seq, - ceph_tid_t journal_tid, Context *oncommit) = 0; + ceph_tid_t journal_tid, Context *oncommit, + ZTracer::Trace *trace = nullptr) = 0; virtual void overwrite_extent(const object_t& oid, uint64_t off, uint64_t len, ceph_tid_t original_journal_tid, diff --git a/src/test/librbd/io/test_mock_ImageRequest.cc b/src/test/librbd/io/test_mock_ImageRequest.cc index 50b60e73828..6cac1de9313 100644 --- a/src/test/librbd/io/test_mock_ImageRequest.cc +++ b/src/test/librbd/io/test_mock_ImageRequest.cc @@ -173,7 +173,7 @@ struct TestMockIoImageRequest : public TestMockFixture { uint64_t offset, uint64_t length, uint64_t journal_tid, int r) { EXPECT_CALL(mock_image_ctx, write_to_cache(object, _, length, offset, _, _, - journal_tid)) + journal_tid, _)) .WillOnce(WithArg<4>(CompleteContext(r, mock_image_ctx.image_ctx->op_work_queue))); } diff --git a/src/test/librbd/mock/MockImageCtx.h b/src/test/librbd/mock/MockImageCtx.h index e7147a2cfe6..4f1e7054edc 100644 --- a/src/test/librbd/mock/MockImageCtx.h +++ b/src/test/librbd/mock/MockImageCtx.h @@ -16,6 +16,7 @@ #include "test/librbd/mock/io/MockImageRequestWQ.h" #include "common/RWLock.h" #include "common/WorkQueue.h" +#include "common/zipkin_trace.h" #include "librbd/ImageCtx.h" #include "gmock/gmock.h" #include @@ -192,10 +193,10 @@ struct MockImageCtx { MOCK_CONST_METHOD0(get_journal_policy, journal::Policy*()); MOCK_CONST_METHOD1(set_journal_policy, void(journal::Policy*)); - MOCK_METHOD7(aio_read_from_cache, void(object_t, uint64_t, bufferlist *, - size_t, uint64_t, Context *, int)); - MOCK_METHOD7(write_to_cache, void(object_t, const bufferlist&, size_t, - uint64_t, Context *, int, uint64_t)); + MOCK_METHOD8(aio_read_from_cache, void(object_t, uint64_t, bufferlist *, + size_t, uint64_t, Context *, int, ZTracer::Trace *)); + MOCK_METHOD8(write_to_cache, void(object_t, const bufferlist&, size_t, + uint64_t, Context *, int, uint64_t, ZTracer::Trace *)); ImageCtx *image_ctx; CephContext *cct; diff --git a/src/test/osdc/FakeWriteback.cc b/src/test/osdc/FakeWriteback.cc index 47e778ef021..29d94fc25e1 100644 --- a/src/test/osdc/FakeWriteback.cc +++ b/src/test/osdc/FakeWriteback.cc @@ -62,7 +62,8 @@ void FakeWriteback::read(const object_t& oid, uint64_t object_no, const object_locator_t& oloc, uint64_t off, uint64_t len, snapid_t snapid, bufferlist *pbl, uint64_t trunc_size, - __u32 trunc_seq, int op_flags, Context *onfinish) + __u32 trunc_seq, int op_flags, Context *onfinish, + ZTracer::Trace *trace) { C_Delay *wrapper = new C_Delay(m_cct, onfinish, m_lock, off, pbl, m_delay_ns); @@ -75,7 +76,8 @@ ceph_tid_t FakeWriteback::write(const object_t& oid, const SnapContext& snapc, const bufferlist &bl, ceph::real_time mtime, uint64_t trunc_size, __u32 trunc_seq, - ceph_tid_t journal_tid, Context *oncommit) + ceph_tid_t journal_tid, Context *oncommit, + ZTracer::Trace *trace) { C_Delay *wrapper = new C_Delay(m_cct, oncommit, m_lock, off, NULL, m_delay_ns); diff --git a/src/test/osdc/FakeWriteback.h b/src/test/osdc/FakeWriteback.h index d6d0235a4bf..d0c5449a828 100644 --- a/src/test/osdc/FakeWriteback.h +++ b/src/test/osdc/FakeWriteback.h @@ -20,14 +20,15 @@ public: void read(const object_t& oid, uint64_t object_no, const object_locator_t& oloc, uint64_t off, uint64_t len, snapid_t snapid, bufferlist *pbl, uint64_t trunc_size, - __u32 trunc_seq, int op_flags, Context *onfinish) override; + __u32 trunc_seq, int op_flags, Context *onfinish, + ZTracer::Trace *trace) override; ceph_tid_t write(const object_t& oid, const object_locator_t& oloc, uint64_t off, uint64_t len, const SnapContext& snapc, const bufferlist &bl, ceph::real_time mtime, uint64_t trunc_size, __u32 trunc_seq, ceph_tid_t journal_tid, - Context *oncommit) override; + Context *oncommit, ZTracer::Trace *trace) override; using WritebackHandler::write; diff --git a/src/test/osdc/MemWriteback.cc b/src/test/osdc/MemWriteback.cc index 801d1556082..cc9bda9fe98 100644 --- a/src/test/osdc/MemWriteback.cc +++ b/src/test/osdc/MemWriteback.cc @@ -92,7 +92,8 @@ void MemWriteback::read(const object_t& oid, uint64_t object_no, const object_locator_t& oloc, uint64_t off, uint64_t len, snapid_t snapid, bufferlist *pbl, uint64_t trunc_size, - __u32 trunc_seq, int op_flags, Context *onfinish) + __u32 trunc_seq, int op_flags, Context *onfinish, + ZTracer::Trace *trace) { assert(snapid == CEPH_NOSNAP); C_DelayRead *wrapper = new C_DelayRead(this, m_cct, onfinish, m_lock, oid, @@ -106,7 +107,8 @@ ceph_tid_t MemWriteback::write(const object_t& oid, const SnapContext& snapc, const bufferlist &bl, ceph::real_time mtime, uint64_t trunc_size, __u32 trunc_seq, - ceph_tid_t journal_tid, Context *oncommit) + ceph_tid_t journal_tid, Context *oncommit, + ZTracer::Trace *trace) { assert(snapc.seq == 0); C_DelayWrite *wrapper = new C_DelayWrite(this, m_cct, oncommit, m_lock, oid, diff --git a/src/test/osdc/MemWriteback.h b/src/test/osdc/MemWriteback.h index 726f297d4ca..c4daae937b2 100644 --- a/src/test/osdc/MemWriteback.h +++ b/src/test/osdc/MemWriteback.h @@ -20,14 +20,15 @@ public: void read(const object_t& oid, uint64_t object_no, const object_locator_t& oloc, uint64_t off, uint64_t len, snapid_t snapid, bufferlist *pbl, uint64_t trunc_size, - __u32 trunc_seq, int op_flags, Context *onfinish) override; + __u32 trunc_seq, int op_flags, Context *onfinish, + ZTracer::Trace *trace) override; ceph_tid_t write(const object_t& oid, const object_locator_t& oloc, uint64_t off, uint64_t len, const SnapContext& snapc, const bufferlist &bl, ceph::real_time mtime, uint64_t trunc_size, __u32 trunc_seq, ceph_tid_t journal_tid, - Context *oncommit) override; + Context *oncommit, ZTracer::Trace *trace) override; using WritebackHandler::write; -- 2.39.5