From: Sage Weil Date: Wed, 31 Jan 2018 16:48:45 +0000 (-0600) Subject: os/ObjectStore: remove void *osr from Transaction X-Git-Tag: v13.0.2~325^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ab67958010278b48f56a11205ac58b84320e6cf2;p=ceph.git os/ObjectStore: remove void *osr from Transaction No longer used! (It was only needed for an ugly FileStore hack.) Signed-off-by: Sage Weil --- diff --git a/src/os/ObjectStore.h b/src/os/ObjectStore.h index 7f841e882302..69e63ef4636c 100644 --- a/src/os/ObjectStore.h +++ b/src/os/ObjectStore.h @@ -435,8 +435,6 @@ public: private: TransactionData data; - void *osr {nullptr}; // NULL on replay - map coll_index; map object_index; @@ -466,7 +464,6 @@ public: // override default move operations to reset default values Transaction(Transaction&& other) noexcept : data(std::move(other.data)), - osr(other.osr), coll_index(std::move(other.coll_index)), object_index(std::move(other.object_index)), coll_id(other.coll_id), @@ -477,14 +474,12 @@ public: on_applied(std::move(other.on_applied)), on_commit(std::move(other.on_commit)), on_applied_sync(std::move(other.on_applied_sync)) { - other.osr = nullptr; other.coll_id = 0; other.object_id = 0; } Transaction& operator=(Transaction&& other) noexcept { data = std::move(other.data); - osr = other.osr; coll_index = std::move(other.coll_index); object_index = std::move(other.object_index); coll_id = other.coll_id; @@ -495,7 +490,6 @@ public: on_applied = std::move(other.on_applied); on_commit = std::move(other.on_commit); on_applied_sync = std::move(other.on_applied_sync); - other.osr = nullptr; other.coll_id = 0; other.object_id = 0; return *this; @@ -825,14 +819,6 @@ public: return data.ops; } - void set_osr(void *s) { - osr = s; - } - - void *get_osr() { - return osr; - } - /** * iterator * diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 9b50d6200d00..911a6153f07f 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -9013,7 +9013,6 @@ int BlueStore::queue_transactions( txc->oncommits.swap(on_commit); for (vector::iterator p = tls.begin(); p != tls.end(); ++p) { - (*p).set_osr(osr); txc->bytes += (*p).get_num_bytes(); _txc_add_transaction(txc, &(*p)); } diff --git a/src/os/filestore/FileStore.cc b/src/os/filestore/FileStore.cc index c50588fdb36c..3d2d2c6bee99 100644 --- a/src/os/filestore/FileStore.cc +++ b/src/os/filestore/FileStore.cc @@ -2200,11 +2200,6 @@ int FileStore::queue_transactions(CollectionHandle& ch, vector& tls OpSequencer *osr = static_cast(ch.get()); dout(5) << __FUNC__ << ": osr " << osr << " " << *osr << dendl; - // used to include osr information in tracepoints during transaction apply - for (vector::iterator i = tls.begin(); i != tls.end(); ++i) { - (*i).set_osr(osr); - } - ZTracer::Trace trace; if (osd_op && osd_op->pg_trace) { osd_op->store_trace.init("filestore op", &trace_endpoint, &osd_op->pg_trace); diff --git a/src/os/kstore/KStore.cc b/src/os/kstore/KStore.cc index a0a79274eb88..0ecf87a5684d 100644 --- a/src/os/kstore/KStore.cc +++ b/src/os/kstore/KStore.cc @@ -2145,7 +2145,6 @@ int KStore::queue_transactions( txc->oncommit = ondisk; for (vector::iterator p = tls.begin(); p != tls.end(); ++p) { - (*p).set_osr(osr); txc->ops += (*p).get_num_ops(); txc->bytes += (*p).get_num_bytes(); _txc_add_transaction(txc, &(*p));