]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
include/memory.h: remove memory.h 22690/head
authorKefu Chai <kchai@redhat.com>
Tue, 19 Jun 2018 06:30:57 +0000 (14:30 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 26 Jun 2018 09:52:04 +0000 (17:52 +0800)
memory.h was introduced back when the shared_ptrs were still in TR1, but
we've moved to C++17 now. and the C++ clients should be compiled with
a C++11 compatible compiler. so there is no need to have this file anymore.

also replace all references of ceph::shared_ptr and ceph::weak_ptr with
std::shared_ptr and std::weak_ptr accordingly.

Signed-off-by: Kefu Chai <kchai@redhat.com>
87 files changed:
alpine/APKBUILD.in
ceph.spec.in
debian/librados-dev.install
src/auth/Crypto.h
src/common/Graylog.h
src/common/shared_cache.hpp
src/common/sharedptr_registry.hpp
src/crypto/crypto_accel.h
src/crypto/crypto_plugin.h
src/include/CMakeLists.txt
src/include/Context.h
src/include/denc.h
src/include/encoding.h
src/include/memory.h [deleted file]
src/include/rados/librados.hpp
src/kv/KeyValueDB.h
src/kv/KineticStore.cc
src/kv/KineticStore.h
src/kv/LevelDBStore.cc
src/kv/LevelDBStore.h
src/kv/MemDB.h
src/librados/ListObjectImpl.h
src/mds/DamageTable.h
src/mds/ScrubHeader.h
src/mds/SimpleLock.h
src/mds/events/EMetaBlob.h
src/mds/journal.cc
src/mgr/PyOSDMap.cc
src/mon/MonOpRequest.h
src/mon/Monitor.h
src/mon/MonitorDBStore.h
src/msg/async/AsyncConnection.h
src/msg/async/dpdk/DPDK.h
src/msg/simple/Pipe.cc
src/msg/simple/Pipe.h
src/msg/xio/XioConnection.h
src/os/ObjectMap.h
src/os/ObjectStore.cc
src/os/bluestore/BitmapFreelistManager.cc
src/os/bluestore/BitmapFreelistManager.h
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h
src/os/filestore/CollectionIndex.h
src/os/filestore/DBObjectMap.cc
src/os/filestore/DBObjectMap.h
src/os/filestore/FDCache.h
src/os/filestore/IndexManager.cc
src/os/filestore/IndexManager.h
src/os/filestore/LFNIndex.h
src/os/filestore/WBThrottle.h
src/os/kstore/KStore.h
src/os/memstore/MemStore.cc
src/os/memstore/MemStore.h
src/osd/ECUtil.h
src/osd/OSD.h
src/osd/OSDMap.h
src/osd/PG.cc
src/osd/PG.h
src/osd/PGBackend.h
src/osd/PGPeeringEvent.h
src/osd/PrimaryLogPG.h
src/osd/ReplicatedBackend.h
src/osd/Watch.h
src/osd/osd_internal_types.h
src/osd/osd_types.h
src/rgw/rgw_bucket.h
src/test/ObjectMap/KeyValueDBMemory.cc
src/test/ObjectMap/KeyValueDBMemory.h
src/test/ObjectMap/test_keyvaluedb_atomicity.cc
src/test/ObjectMap/test_keyvaluedb_iterators.cc
src/test/ObjectMap/test_object_map.cc
src/test/bufferlist.cc
src/test/common/test_shared_cache.cc
src/test/common/test_sharedptr_registry.cc
src/test/confutils.cc
src/test/osd/Object.cc
src/test/osd/Object.h
src/test/osd/RadosModel.h
src/test/osd/types.cc
src/test/osdc/object_cacher_stress.cc
src/test/rbd_mirror/test_fixture.h
src/test/test_snap_mapper.cc
src/tools/ceph_monstore_tool.cc
src/tools/cephfs/JournalTool.cc
src/tools/rbd_ggate/Server.cc
src/tools/rbd_mirror/types.h
src/tools/rbd_nbd/rbd-nbd.cc

index 1b6d964db0d69090945fb4dcc4cb3cf7f48739ec..64908a3beedd78f98c73292da8b8489d95f1211b 100644 (file)
@@ -315,8 +315,7 @@ librados_dev() {
                page.h \
                crc32c.h \
                rados_types.h \
-               rados_types.hpp \
-               memory.h
+               rados_types.hpp
        _pkg $_libdir librados.so
        _pkg $_bindir librados-config
 }
index ace3a692a5c9bbb22b864392d2fad0cc8d0ddcba..158bb29bb5857ac1145cccddb7aadb1f97a6ea7c 100644 (file)
@@ -1583,7 +1583,6 @@ fi
 %{_includedir}/rados/crc32c.h
 %{_includedir}/rados/rados_types.h
 %{_includedir}/rados/rados_types.hpp
-%{_includedir}/rados/memory.h
 %{_libdir}/librados.so
 %if %{with lttng}
 %{_libdir}/librados_tp.so
index 19ce3914fbd1075991c03cc7c4e7a2c1d73794be..d9410cae0e289893f80fbb159bd08025129b06b3 100644 (file)
@@ -5,7 +5,6 @@ usr/include/rados/crc32c.h
 usr/include/rados/inline_memory.h
 usr/include/rados/librados.h
 usr/include/rados/librados.hpp
-usr/include/rados/memory.h
 usr/include/rados/page.h
 usr/include/rados/rados_types.h
 usr/include/rados/rados_types.hpp
index fa1941233a024897027498439e85981e48a31c00..cc999b0a1a4cb663e858c285c34222b469ef384e 100644 (file)
@@ -17,7 +17,6 @@
 
 #include "include/types.h"
 #include "include/utime.h"
-#include "include/memory.h"
 #include "include/buffer.h"
 
 #include <string>
@@ -94,7 +93,7 @@ protected:
 
   // cache a pointer to the implementation-specific key handler, so we
   // don't have to create it for every crypto operation.
-  mutable ceph::shared_ptr<CryptoKeyHandler> ckh;
+  mutable std::shared_ptr<CryptoKeyHandler> ckh;
 
   int _set_secret(int type, const bufferptr& s);
 
index 4f06803855c62b265be4f2d54e859217ac6b54a8..70cd770504ebc4311bbcd8f7b2429b427f60fcd7 100644 (file)
@@ -8,7 +8,6 @@
 #include <boost/iostreams/filtering_stream.hpp>
 #include <boost/iostreams/filter/zlib.hpp>
 
-#include "include/memory.h"
 #include "include/assert.h"  // boost clobbers this
 
 struct uuid_d;
@@ -55,7 +54,7 @@ class Graylog
   void log_entry(Entry const * const e);
   void log_log_entry(LogEntry const * const e);
 
-  typedef ceph::shared_ptr<Graylog> Ref;
+  typedef std::shared_ptr<Graylog> Ref;
 
  private:
   SubsystemMap const * const m_subs;
index 8d923eefc4de72ed2f677141c86ac922c494a286..59179bfbad14fdc47f1146145d94582c3eb748e2 100644 (file)
@@ -27,8 +27,8 @@
 template <class K, class V, class C = std::less<K>, class H = std::hash<K> >
 class SharedLRU {
   CephContext *cct;
-  typedef ceph::shared_ptr<V> VPtr;
-  typedef ceph::weak_ptr<V> WeakVPtr;
+  typedef std::shared_ptr<V> VPtr;
+  typedef std::weak_ptr<V> WeakVPtr;
   Mutex lock;
   size_t max_size;
   Cond cond;
index bb0fcadefd2a5479801c5c87a12365d52fc31ed5..df9123ff37589920ec3cd68d272310c2e6d4eb04 100644 (file)
@@ -27,8 +27,8 @@
 template <class K, class V, class C = std::less<K> >
 class SharedPtrRegistry {
 public:
-  typedef ceph::shared_ptr<V> VPtr;
-  typedef ceph::weak_ptr<V> WeakVPtr;
+  typedef std::shared_ptr<V> VPtr;
+  typedef std::weak_ptr<V> WeakVPtr;
   int waiting;
 private:
   Mutex lock;
index caefa38a366fafdaacb7456692413f2f98902ce0..5c159360992736c2e0cc76c8764c03bfa4d84009 100644 (file)
@@ -18,7 +18,7 @@
 #include "include/Context.h"
 
 class CryptoAccel;
-typedef ceph::shared_ptr<CryptoAccel> CryptoAccelRef;
+typedef std::shared_ptr<CryptoAccel> CryptoAccelRef;
 
 class CryptoAccel {
  public:
index ff91b11b276312b59784e40b1c2059f9ac49decd..f0f37427f2b3cc00fb543835b0489925d6882f14 100644 (file)
@@ -16,7 +16,6 @@
 #define CRYPTO_PLUGIN_H
 
 // -----------------------------------------------------------------------------
-#include "include/memory.h"
 #include "common/PluginRegistry.h"
 #include "ostream"
 
index 23aec6ba69828b5f40293a7961b173eaa288acde..581b3ebe03ef4ddb780678f130eae8ea17b60222 100644 (file)
@@ -5,7 +5,6 @@ install(FILES rados/librados.h
   buffer.h
   buffer_fwd.h
   inline_memory.h
-  memory.h
   page.h
   crc32c.h
   rados/objclass.h
index 2eb008245c089e7e19a8badfea0c2e3dae82fff6..2dff7302d97ec70af927ab29530d4ec898b21102 100644 (file)
@@ -24,7 +24,6 @@
 #include <memory>
 
 #include "include/assert.h"
-#include "include/memory.h"
 
 #define mydout(cct, v) lgeneric_subdout(cct, context, v)
 
@@ -119,7 +118,7 @@ struct RunOnDelete {
       to_run->complete(0);
   }
 };
-typedef ceph::shared_ptr<RunOnDelete> RunOnDeleteRef;
+typedef std::shared_ptr<RunOnDelete> RunOnDeleteRef;
 
 template <typename T>
 struct LambdaContext : public Context {
index bbb830959ce840aa692ad5f5395d2b4c129b7682..b32502a960325ed9f619b81b85e3dcdd27ba4c7b 100644 (file)
@@ -41,7 +41,6 @@
 #include "include/assert.h"    // boost clobbers this
 #include "include/intarith.h"
 #include "include/int_types.h"
-#include "include/memory.h"
 
 #include "buffer.h"
 #include "byteorder.h"
index 85ae2fe823affca31d99a4c45341bd11687fabff..130d5dee379f2d40e7757de77434182daadbbda5 100644 (file)
@@ -30,8 +30,6 @@
 
 #include "include/int_types.h"
 
-#include "include/memory.h"
-
 #include "common/convenience.h"
 
 #include "byteorder.h"
@@ -364,13 +362,13 @@ template<class T, class Alloc, typename traits=denc_traits<T>>
 inline std::enable_if_t<!traits::supported>
 decode(std::list<T,Alloc>& ls, bufferlist::const_iterator& p);
 template<class T, class Alloc>
-inline void encode(const std::list<ceph::shared_ptr<T>, Alloc>& ls,
+inline void encode(const std::list<std::shared_ptr<T>, Alloc>& ls,
                   bufferlist& bl);
 template<class T, class Alloc>
-inline void encode(const std::list<ceph::shared_ptr<T>, Alloc>& ls,
+inline void encode(const std::list<std::shared_ptr<T>, Alloc>& ls,
                   bufferlist& bl, uint64_t features);
 template<class T, class Alloc>
-inline void decode(std::list<ceph::shared_ptr<T>, Alloc>& ls,
+inline void decode(std::list<std::shared_ptr<T>, Alloc>& ls,
                   bufferlist::const_iterator& p);
 template<class T, class Comp, class Alloc, typename traits=denc_traits<T>>
 inline std::enable_if_t<!traits::supported>
@@ -418,14 +416,14 @@ template<class T, class Alloc, typename traits=denc_traits<T>>
 inline std::enable_if_t<!traits::supported>
 decode_nohead(int len, std::vector<T,Alloc>& v, bufferlist::const_iterator& p);
 template<class T,class Alloc>
-inline void encode(const std::vector<ceph::shared_ptr<T>,Alloc>& v,
+inline void encode(const std::vector<std::shared_ptr<T>,Alloc>& v,
                   bufferlist& bl,
                   uint64_t features);
 template<class T, class Alloc>
-inline void encode(const std::vector<ceph::shared_ptr<T>,Alloc>& v,
+inline void encode(const std::vector<std::shared_ptr<T>,Alloc>& v,
                   bufferlist& bl);
 template<class T, class Alloc>
-inline void decode(std::vector<ceph::shared_ptr<T>,Alloc>& v,
+inline void decode(std::vector<std::shared_ptr<T>,Alloc>& v,
                   bufferlist::const_iterator& p);
 template<class T, class U, class Comp, class Alloc,
         typename t_traits=denc_traits<T>, typename u_traits=denc_traits<U>>
@@ -659,9 +657,9 @@ inline std::enable_if_t<!traits::supported>
   }
 }
 
-// std::list<ceph::shared_ptr<T>>
+// std::list<std::shared_ptr<T>>
 template<class T, class Alloc>
-inline void encode(const std::list<ceph::shared_ptr<T>, Alloc>& ls,
+inline void encode(const std::list<std::shared_ptr<T>, Alloc>& ls,
                   bufferlist& bl)
 {
   __u32 n = (__u32)(ls.size());  // c++11 std::list::size() is O(1)
@@ -670,7 +668,7 @@ inline void encode(const std::list<ceph::shared_ptr<T>, Alloc>& ls,
     encode(**p, bl);
 }
 template<class T, class Alloc>
-inline void encode(const std::list<ceph::shared_ptr<T>, Alloc>& ls,
+inline void encode(const std::list<std::shared_ptr<T>, Alloc>& ls,
                   bufferlist& bl, uint64_t features)
 {
   __u32 n = (__u32)(ls.size());  // c++11 std::list::size() is O(1)
@@ -679,14 +677,14 @@ inline void encode(const std::list<ceph::shared_ptr<T>, Alloc>& ls,
     encode(**p, bl, features);
 }
 template<class T, class Alloc>
-inline void decode(std::list<ceph::shared_ptr<T>, Alloc>& ls,
+inline void decode(std::list<std::shared_ptr<T>, Alloc>& ls,
                   bufferlist::const_iterator& p)
 {
   __u32 n;
   decode(n, p);
   ls.clear();
   while (n--) {
-    ceph::shared_ptr<T> v(std::make_shared<T>());
+    std::shared_ptr<T> v(std::make_shared<T>());
     decode(*v, p);
     ls.push_back(v);
   }
@@ -849,7 +847,7 @@ inline std::enable_if_t<!traits::supported>
 
 // vector (shared_ptr)
 template<class T,class Alloc>
-inline void encode(const std::vector<ceph::shared_ptr<T>,Alloc>& v,
+inline void encode(const std::vector<std::shared_ptr<T>,Alloc>& v,
                   bufferlist& bl,
                   uint64_t features)
 {
@@ -862,7 +860,7 @@ inline void encode(const std::vector<ceph::shared_ptr<T>,Alloc>& v,
       encode(T(), bl, features);
 }
 template<class T, class Alloc>
-inline void encode(const std::vector<ceph::shared_ptr<T>,Alloc>& v,
+inline void encode(const std::vector<std::shared_ptr<T>,Alloc>& v,
                   bufferlist& bl)
 {
   __u32 n = (__u32)(v.size());
@@ -874,7 +872,7 @@ inline void encode(const std::vector<ceph::shared_ptr<T>,Alloc>& v,
       encode(T(), bl);
 }
 template<class T, class Alloc>
-inline void decode(std::vector<ceph::shared_ptr<T>,Alloc>& v,
+inline void decode(std::vector<std::shared_ptr<T>,Alloc>& v,
                   bufferlist::const_iterator& p)
 {
   __u32 n;
diff --git a/src/include/memory.h b/src/include/memory.h
deleted file mode 100644 (file)
index 409b49f..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef CEPH_MEMORY_H
-#define CEPH_MEMORY_H
-
-#include <memory>
-
-namespace ceph {
-  using std::shared_ptr;
-  using std::weak_ptr;
-  using std::unique_ptr;
-  using std::static_pointer_cast;
-}
-
-#endif
index a7aad81c9e430bf06c44e34e59cf111574556142..004e61f5f33ab25ab8943ac326bccb8e8d28b337 100644 (file)
@@ -7,7 +7,6 @@
 #include <set>
 #include <vector>
 #include <utility>
-#include "memory.h"
 #include "buffer.h"
 
 #include "librados.h"
index 7589f1c7adbed89d2d63d7fe58f738282c037451..a3fbe2fd54050f27453d9cae544208ee43899b6f 100644 (file)
@@ -8,7 +8,6 @@
 #include <set>
 #include <map>
 #include <string>
-#include "include/memory.h"
 #include <boost/scoped_ptr.hpp>
 #include "include/encoding.h"
 #include "common/Formatter.h"
@@ -147,7 +146,7 @@ public:
 
     virtual ~TransactionImpl() {}
   };
-  typedef ceph::shared_ptr< TransactionImpl > Transaction;
+  typedef std::shared_ptr< TransactionImpl > Transaction;
 
   /// create a new instance
   static KeyValueDB *create(CephContext *cct, const std::string& type,
@@ -233,7 +232,7 @@ public:
       }
     }
   };
-  typedef ceph::shared_ptr< IteratorImpl > Iterator;
+  typedef std::shared_ptr< IteratorImpl > Iterator;
 
   // This is the low-level iterator implemented by the underlying KV store.
   class WholeSpaceIteratorImpl {
@@ -268,7 +267,7 @@ public:
     }
     virtual ~WholeSpaceIteratorImpl() { }
   };
-  typedef ceph::shared_ptr< WholeSpaceIteratorImpl > WholeSpaceIterator;
+  typedef std::shared_ptr< WholeSpaceIteratorImpl > WholeSpaceIterator;
 
 private:
   int64_t cache_bytes[PriorityCache::Priority::LAST+1] = { 0 };
index 60dadacb2f2a62f926e1d059a570e05eea396c7f..682f3f1cf0d43955451fcedaad8d7bdd3dce7534 100644 (file)
@@ -6,7 +6,6 @@
 #include <set>
 #include <map>
 #include <string>
-#include "include/memory.h"
 #include <errno.h>
 using std::string;
 #include "common/perf_counters.h"
index 4fe0eab85173014b102ef5bbe3c57042e0608e92..b7c669a66913bfbfb73eabe20e5427d71e4e85e8 100644 (file)
@@ -9,7 +9,6 @@
 #include <set>
 #include <map>
 #include <string>
-#include "include/memory.h"
 #include <kinetic/kinetic.h>
 
 #include <errno.h>
index 9f5158a7c755395825dbba7218ba03947a8b7a0f..58cb2538db984d149c062fb63e95c43381319fa9 100644 (file)
@@ -9,8 +9,6 @@
 
 using std::string;
 
-#include "include/memory.h"
-
 #include "common/debug.h"
 #include "common/perf_counters.h"
 
index 703f1eb519e8c2f9b6868e7700cc632b8dc84628..9700de62f78e423a81b7859e2821fcead854ef7f 100644 (file)
@@ -9,7 +9,6 @@
 #include <set>
 #include <map>
 #include <string>
-#include "include/memory.h"
 #include <boost/scoped_ptr.hpp>
 #include "leveldb/db.h"
 #include "leveldb/env.h"
index 16b4aed8dd1274557bae78d5f52ff6f1e7cd6993..032b2ccb8e98ffafd76aa3d3f8dad1749419df14 100644 (file)
@@ -14,7 +14,6 @@
 #include <map>
 #include <string>
 #include <memory>
-#include "include/memory.h"
 #include <boost/scoped_ptr.hpp>
 #include "include/encoding.h"
 #include "include/btree_map.h"
index 7e6052546525a02011ea2d8051dcaf9b26475b1e..c8c496b60b2417cc13633fff972e456612b612bc 100644 (file)
@@ -78,7 +78,7 @@ class NObjectIteratorImpl {
   private:
     NObjectIteratorImpl(ObjListCtx *ctx_);
     void get_next();
-    ceph::shared_ptr < ObjListCtx > ctx;
+    std::shared_ptr < ObjListCtx > ctx;
     ListObject cur_obj;
 };
 
index be2a5331ea3fae536b358064e177a7f1c9b85e49..fee50644f900f4a89b7c56f17c3f639451b39ea1 100644 (file)
@@ -57,7 +57,7 @@ class DamageEntry
 };
 
 
-typedef ceph::shared_ptr<DamageEntry> DamageEntryRef;
+typedef std::shared_ptr<DamageEntry> DamageEntryRef;
 
 
 class DirFragIdent
index ea1ad7543295b289748a4948bbf7c47a93216f04..0c1cd6ae08a694423499fdd245f397d1b36ee0bf 100644 (file)
@@ -59,8 +59,8 @@ protected:
   bool repaired = false;  // May be set during scrub if repairs happened
 };
 
-typedef ceph::shared_ptr<ScrubHeader> ScrubHeaderRef;
-typedef ceph::shared_ptr<const ScrubHeader> ScrubHeaderRefConst;
+typedef std::shared_ptr<ScrubHeader> ScrubHeaderRef;
+typedef std::shared_ptr<const ScrubHeader> ScrubHeaderRefConst;
 
 #endif // SCRUB_HEADER_H_
 
index 0342e0cf113ae5815eaf6a3257b56e73e1c2ddf2..17b3f85619496251e7fa4dc99bd8430c71fdab81 100644 (file)
@@ -43,7 +43,6 @@ inline const char *get_lock_type_name(int t) {
   }
 }
 
-#include "include/memory.h"
 
 struct MutationImpl;
 typedef boost::intrusive_ptr<MutationImpl> MutationRef;
index 9afa3f69a1ca073d8f0468e89aa6855563a11ce0..1686bab37d3cd8ab16dd2766ef54603882074a20 100644 (file)
@@ -207,7 +207,7 @@ public:
   private:
     mutable bufferlist dnbl;
     mutable bool dn_decoded;
-    mutable list<ceph::shared_ptr<fullbit> > dfull;
+    mutable list<std::shared_ptr<fullbit> > dfull;
     mutable list<remotebit> dremote;
     mutable list<nullbit> dnull;
 
@@ -225,12 +225,12 @@ public:
     bool is_dirty_dft() { return state & STATE_DIRTYDFT; }
     void mark_dirty_dft() { state |= STATE_DIRTYDFT; }
 
-    const list<ceph::shared_ptr<fullbit> > &get_dfull()   const { return dfull; }
+    const list<std::shared_ptr<fullbit> > &get_dfull()   const { return dfull; }
     const list<remotebit>                  &get_dremote() const { return dremote; }
     const list<nullbit>                    &get_dnull()   const { return dnull; }
 
     void add_dnull(nullbit const &n)                   { dnull.push_back(n); };
-    void add_dfull(ceph::shared_ptr<fullbit> const &p) { dfull.push_back(p); };
+    void add_dfull(std::shared_ptr<fullbit> const &p) { dfull.push_back(p); };
     void add_dremote(remotebit const &r)               { dremote.push_back(r); };
 
     void print(dirfrag_t dirfrag, ostream& out) {
@@ -239,7 +239,7 @@ public:
          << " num " << nfull << "/" << nremote << "/" << nnull
          << std::endl;
       _decode_bits();
-      for (list<ceph::shared_ptr<fullbit> >::iterator p = dfull.begin(); p != dfull.end(); ++p)
+      for (list<std::shared_ptr<fullbit> >::iterator p = dfull.begin(); p != dfull.end(); ++p)
        (*p)->print(out);
       for (list<remotebit>::iterator p = dremote.begin(); p != dremote.end(); ++p)
        p->print(out);
@@ -292,7 +292,7 @@ public:
   // my lumps.  preserve the order we added them in a list.
   list<dirfrag_t>         lump_order;
   map<dirfrag_t, dirlump> lump_map;
-  list<ceph::shared_ptr<fullbit> > roots;
+  list<std::shared_ptr<fullbit> > roots;
 public:
   list<pair<__u8,version_t> > table_tids;  // tableclient transactions
 
@@ -455,7 +455,7 @@ private:
       sr->encode(snapbl);
 
     lump.nfull++;
-    lump.add_dfull(ceph::shared_ptr<fullbit>(new fullbit(dn->get_name(),
+    lump.add_dfull(std::shared_ptr<fullbit>(new fullbit(dn->get_name(),
                                                         dn->first, dn->last,
                                                         dn->get_projected_version(),
                                                         *pi, in->dirfragtree,
@@ -506,7 +506,7 @@ private:
     if (sr)
       sr->encode(snapbl);
 
-    for (list<ceph::shared_ptr<fullbit> >::iterator p = roots.begin(); p != roots.end(); ++p) {
+    for (list<std::shared_ptr<fullbit> >::iterator p = roots.begin(); p != roots.end(); ++p) {
       if ((*p)->inode.ino == in->ino()) {
        roots.erase(p);
        break;
@@ -514,7 +514,7 @@ private:
     }
 
     string empty;
-    roots.push_back(ceph::shared_ptr<fullbit>(new fullbit(empty, in->first, in->last, 0, pi,
+    roots.push_back(std::shared_ptr<fullbit>(new fullbit(empty, in->first, in->last, 0, pi,
                                                          pdft, px, in->symlink,
                                                          in->oldest_snap, snapbl,
                                                          dirty ? fullbit::STATE_DIRTY : 0,
index e67c3858c17a9e5f29d056da36e30e82e1890d5b..5fc864b955806ec6595edf3d47b3dc4939158af7 100644 (file)
@@ -731,7 +731,7 @@ void EMetaBlob::dirlump::dump(Formatter *f) const
   f->dump_int("nnull", nnull);
 
   f->open_array_section("full bits");
-  for (list<ceph::shared_ptr<fullbit> >::const_iterator
+  for (list<std::shared_ptr<fullbit> >::const_iterator
       iter = dfull.begin(); iter != dfull.end(); ++iter) {
     f->open_object_section("fullbit");
     (*iter)->dump(f);
@@ -806,7 +806,7 @@ void EMetaBlob::decode(bufferlist::const_iterator &bl)
     decode(rootbl, bl);
     if (rootbl.length()) {
       auto p = rootbl.cbegin();
-      roots.push_back(ceph::shared_ptr<fullbit>(new fullbit(p)));
+      roots.push_back(std::shared_ptr<fullbit>(new fullbit(p)));
     }
   }
   decode(table_tids, bl);
@@ -866,8 +866,8 @@ void EMetaBlob::get_inodes(
     dl._decode_bits();
 
     // Record inodes of fullbits
-    list<ceph::shared_ptr<fullbit> > const &fb_list = dl.get_dfull();
-    for (list<ceph::shared_ptr<fullbit> >::const_iterator
+    list<std::shared_ptr<fullbit> > const &fb_list = dl.get_dfull();
+    for (list<std::shared_ptr<fullbit> >::const_iterator
         iter = fb_list.begin(); iter != fb_list.end(); ++iter) {
       inodes.insert((*iter)->inode.ino);
     }
@@ -894,12 +894,12 @@ void EMetaBlob::get_dentries(std::map<dirfrag_t, std::set<std::string> > &dentri
 
     // Get all bits
     dl._decode_bits();
-    list<ceph::shared_ptr<fullbit> > const &fb_list = dl.get_dfull();
+    list<std::shared_ptr<fullbit> > const &fb_list = dl.get_dfull();
     list<nullbit> const &nb_list = dl.get_dnull();
     list<remotebit> const &rb_list = dl.get_dremote();
 
     // For all bits, store dentry
-    for (list<ceph::shared_ptr<fullbit> >::const_iterator
+    for (list<std::shared_ptr<fullbit> >::const_iterator
         iter = fb_list.begin(); iter != fb_list.end(); ++iter) {
       dentries[df].insert((*iter)->dn);
 
@@ -950,11 +950,11 @@ void EMetaBlob::get_paths(
     dirlump const &dl = i->second;
     dl._decode_bits();
 
-    list<ceph::shared_ptr<fullbit> > const &fb_list = dl.get_dfull();
+    list<std::shared_ptr<fullbit> > const &fb_list = dl.get_dfull();
     list<nullbit> const &nb_list = dl.get_dnull();
     list<remotebit> const &rb_list = dl.get_dremote();
 
-    for (list<ceph::shared_ptr<fullbit> >::const_iterator
+    for (list<std::shared_ptr<fullbit> >::const_iterator
         iter = fb_list.begin(); iter != fb_list.end(); ++iter) {
       std::string_view dentry = (*iter)->dn;
       children[dir_ino].emplace_back(dentry);
@@ -984,8 +984,8 @@ void EMetaBlob::get_paths(
     dirlump const &dl = i->second;
     dl._decode_bits();
 
-    list<ceph::shared_ptr<fullbit> > const &fb_list = dl.get_dfull();
-    for (list<ceph::shared_ptr<fullbit> >::const_iterator
+    list<std::shared_ptr<fullbit> > const &fb_list = dl.get_dfull();
+    for (list<std::shared_ptr<fullbit> >::const_iterator
         iter = fb_list.begin(); iter != fb_list.end(); ++iter) {
       std::string_view dentry = (*iter)->dn;
       if (children.find((*iter)->inode.ino) == children.end()) {
@@ -1046,7 +1046,7 @@ void EMetaBlob::dump(Formatter *f) const
   f->close_section(); // lumps
   
   f->open_array_section("roots");
-  for (list<ceph::shared_ptr<fullbit> >::const_iterator i = roots.begin();
+  for (list<std::shared_ptr<fullbit> >::const_iterator i = roots.begin();
        i != roots.end(); ++i) {
     f->open_object_section("root");
     (*i)->dump(f);
@@ -1131,7 +1131,7 @@ void EMetaBlob::replay(MDSRank *mds, LogSegment *logseg, MDSlaveUpdate *slaveup)
 
   assert(g_conf->mds_kill_journal_replay_at != 1);
 
-  for (list<ceph::shared_ptr<fullbit> >::iterator p = roots.begin(); p != roots.end(); ++p) {
+  for (list<std::shared_ptr<fullbit> >::iterator p = roots.begin(); p != roots.end(); ++p) {
     CInode *in = mds->mdcache->get_inode((*p)->inode.ino);
     bool isnew = in ? false:true;
     if (!in)
@@ -1244,10 +1244,10 @@ void EMetaBlob::replay(MDSRank *mds, LogSegment *logseg, MDSlaveUpdate *slaveup)
     lump._decode_bits();
 
     // full dentry+inode pairs
-    for (list<ceph::shared_ptr<fullbit> >::const_iterator pp = lump.get_dfull().begin();
+    for (list<std::shared_ptr<fullbit> >::const_iterator pp = lump.get_dfull().begin();
         pp != lump.get_dfull().end();
         ++pp) {
-      ceph::shared_ptr<fullbit> p = *pp;
+      std::shared_ptr<fullbit> p = *pp;
       CDentry *dn = dir->lookup_exact_snap(p->dn, p->dnlast);
       if (!dn) {
        dn = dir->add_null_dentry(p->dn, p->dnfirst, p->dnlast);
index f49f170df612ca03a95244d4dfe81e4d247f8e0d..3847176f0bd1e13847d35f6f1f74f07b300704a2 100644 (file)
@@ -28,7 +28,7 @@ typedef struct {
 
 typedef struct {
   PyObject_HEAD
-  ceph::shared_ptr<CrushWrapper> crush;
+  std::shared_ptr<CrushWrapper> crush;
 } BasePyCRUSH;
 
 // ----------
@@ -465,7 +465,7 @@ BasePyCRUSH_init(BasePyCRUSH *self,
     }
     assert(PyObject_TypeCheck(crush_capsule, &PyCapsule_Type));
 
-    auto ptr_ref = (ceph::shared_ptr<CrushWrapper>*)(
+    auto ptr_ref = (std::shared_ptr<CrushWrapper>*)(
         PyCapsule_GetPointer(crush_capsule, nullptr));
 
     // We passed a pointer to a shared pointer, which is weird, but
index 364232b1f9d88e57126e93d217a00bae2597c5b6..ef0af47be8e61c35eb1cc1a02efe0c10fd00304b 100644 (file)
@@ -18,7 +18,6 @@
 #include <stdint.h>
 
 #include "common/TrackedOp.h"
-#include "include/memory.h"
 #include "mon/Session.h"
 #include "msg/Message.h"
 
index 43556be430b56f4c43b724a18f687af50c6e3f60..324da5ded989aabc55e3e366d968a339a76b27d8 100644 (file)
@@ -45,7 +45,6 @@
 #include "auth/KeyRing.h"
 #include "messages/MMonCommand.h"
 #include "mon/MonitorDBStore.h"
-#include "include/memory.h"
 #include "mgr/MgrClient.h"
 
 #include "mon/MonOpRequest.h"
@@ -285,7 +284,7 @@ private:
     ScrubState() : finished(false) { }
     virtual ~ScrubState() { }
   };
-  ceph::shared_ptr<ScrubState> scrub_state; ///< keeps track of current scrub
+  std::shared_ptr<ScrubState> scrub_state; ///< keeps track of current scrub
 
   /**
    * @defgroup Monitor_h_sync Synchronization
index f6bb2d748ccbbf937a39ea15d912c90157e9b97c..93fa2ac5f57abc4c8c511867b181fa514eba070d 100644 (file)
@@ -99,7 +99,7 @@ class MonitorDBStore
   };
 
   struct Transaction;
-  typedef ceph::shared_ptr<Transaction> TransactionRef;
+  typedef std::shared_ptr<Transaction> TransactionRef;
   struct Transaction {
     list<Op> ops;
     uint64_t bytes, keys;
@@ -421,7 +421,7 @@ class MonitorDBStore
     virtual void get_chunk_tx(TransactionRef tx, uint64_t max) = 0;
     virtual pair<string,string> get_next_key() = 0;
   };
-  typedef ceph::shared_ptr<StoreIteratorImpl> Synchronizer;
+  typedef std::shared_ptr<StoreIteratorImpl> Synchronizer;
 
   class WholeStoreIteratorImpl : public StoreIteratorImpl {
     KeyValueDB::WholeSpaceIterator iter;
@@ -492,7 +492,7 @@ class MonitorDBStore
     else
       iter->seek_to_first();
 
-    return ceph::shared_ptr<StoreIteratorImpl>(
+    return std::shared_ptr<StoreIteratorImpl>(
        new WholeStoreIteratorImpl(iter, prefixes)
     );
   }
index 0a3da9ddccac82508986cdf3c3b36f6517e673c1..cd5ab7328ef963491252cbef485cd41ce3f4217a 100644 (file)
@@ -367,7 +367,7 @@ class AsyncConnection : public Connection {
   uint64_t state_offset;
   Worker *worker;
   EventCenter *center;
-  ceph::shared_ptr<AuthSessionHandler> session_security;
+  std::shared_ptr<AuthSessionHandler> session_security;
 
  public:
   // used by eventcallback
index a57fcd7cdd81bb824c351ca755f979649eebece7..04127f4aaae6db463fc1fc963fc4eaa7b60fc8d6 100644 (file)
@@ -38,7 +38,6 @@
 #include "const.h"
 #include "circular_buffer.h"
 #include "ethernet.h"
-#include "memory.h"
 #include "Packet.h"
 #include "stream.h"
 #include "net.h"
index 9f44dd8b7c006cc90c46f8fdf5b2e6e256bc78ea..a42ecedf4519fac291980b6cf3cc2acf80893fc0 100644 (file)
@@ -1635,7 +1635,7 @@ void Pipe::reader()
     }
 
     // get a reference to the AuthSessionHandler while we have the pipe_lock
-    ceph::shared_ptr<AuthSessionHandler> auth_handler = session_security;
+    std::shared_ptr<AuthSessionHandler> auth_handler = session_security;
 
     pipe_lock.Unlock();
 
index ca67770cc819286ce24a908a2840d06f90885743..ce9925bd0d9b6a978cdc3e48f51594f4cd013ed4 100644 (file)
@@ -15,7 +15,6 @@
 #ifndef CEPH_MSGR_PIPE_H
 #define CEPH_MSGR_PIPE_H
 
-#include "include/memory.h"
 #include "auth/AuthSessionHandler.h"
 
 #include "msg/msg_types.h"
@@ -128,7 +127,7 @@ static const int SM_IOV_MAX = (IOV_MAX >= 1024 ? IOV_MAX / 4 : IOV_MAX);
 
     // session_security handles any signatures or encryptions required for this pipe's msgs. PLR
 
-    ceph::shared_ptr<AuthSessionHandler> session_security;
+    std::shared_ptr<AuthSessionHandler> session_security;
 
   protected:
     friend class SimpleMessenger;
index a6dc950c2d70ca336ff683b68addf844426ffeec..00024ef3177b688efdc52424af8d6de405356e89 100644 (file)
@@ -132,7 +132,7 @@ private:
     Messenger::Policy policy;
 
     CryptoKey session_key;
-    ceph::shared_ptr<AuthSessionHandler> session_security;
+    std::shared_ptr<AuthSessionHandler> session_security;
     AuthAuthorizer *authorizer;
     XioConnection *xcon;
     uint32_t protocol_version;
index 4db3f17dc4ba59d973051d3f10c0c5778c511b50..8d0a39e423465c71ed46333764826e7a154b101c 100644 (file)
@@ -15,9 +15,9 @@
 #ifndef OS_KEYVALUESTORE_H
 #define OS_KEYVALUESTORE_H
 
+#include <memory>
 #include <string>
 #include <vector>
-#include "include/memory.h"
 #include "kv/KeyValueDB.h"
 #include "common/hobject.h"
 
@@ -157,7 +157,7 @@ public:
   virtual void compact() {}
 
   typedef KeyValueDB::SimplestIteratorImpl ObjectMapIteratorImpl;
-  typedef ceph::shared_ptr<ObjectMapIteratorImpl> ObjectMapIterator;
+  typedef std::shared_ptr<ObjectMapIteratorImpl> ObjectMapIterator;
   virtual ObjectMapIterator get_iterator(const ghobject_t &oid) {
     return ObjectMapIterator();
   }
index be6248c1f219fa39cc8add0e85b0bca870666bcb..d9b9cf6d1ab65fed44fdccb171a1afe9edace3ac 100644 (file)
@@ -13,7 +13,6 @@
  */
 #include <ctype.h>
 #include <sstream>
-#include "include/memory.h"
 #include "ObjectStore.h"
 #include "common/Formatter.h"
 #include "common/safe_io.h"
index 45bcd2b42d7d293b834b0cdc275754020cd098a6..5270dbc9e2010940e77e6f80b21304c0aaa80b33 100644 (file)
@@ -42,7 +42,7 @@ struct XorMergeOperator : public KeyValueDB::MergeOperator {
 
 void BitmapFreelistManager::setup_merge_operator(KeyValueDB *db, string prefix)
 {
-  ceph::shared_ptr<XorMergeOperator> merge_op(new XorMergeOperator);
+  std::shared_ptr<XorMergeOperator> merge_op(new XorMergeOperator);
   db->set_merge_operator(prefix, merge_op);
 }
 
index 65e9f5d925f1fbd6adf45c3ab377bc36010c1cd8..e9dabbbeeb19cc83cd525c5781ef25ebf9198ed8 100644 (file)
@@ -15,7 +15,7 @@
 class BitmapFreelistManager : public FreelistManager {
   std::string meta_prefix, bitmap_prefix;
   KeyValueDB *kvdb;
-  ceph::shared_ptr<KeyValueDB::MergeOperator> merge_op;
+  std::shared_ptr<KeyValueDB::MergeOperator> merge_op;
   std::mutex lock;
 
   uint64_t size;            ///< size of device (bytes)
index 1d5b5e7695c49f344ea161e096d1918a11c6f98f..1c8a7aae75f6e6a97fba21497b80c8d7e52204e2 100644 (file)
@@ -4780,7 +4780,7 @@ int BlueStore::_open_db(bool create, bool to_repair_db)
   string fn = path + "/db";
   string options;
   stringstream err;
-  ceph::shared_ptr<Int64ArrayMergeOperator> merge_op(new Int64ArrayMergeOperator);
+  std::shared_ptr<Int64ArrayMergeOperator> merge_op(new Int64ArrayMergeOperator);
 
   string kv_backend;
   std::vector<KeyValueDB::ColumnFamily> cfs;
index b586444275dcb1d604034fb120a8e8941742a14e..33aa3f82d8a31a0ffae6af534abc3532af2cb4d3 100644 (file)
@@ -31,7 +31,6 @@
 
 #include "include/assert.h"
 #include "include/unordered_map.h"
-#include "include/memory.h"
 #include "include/mempool.h"
 #include "common/bloom_filter.hpp"
 #include "common/Finisher.h"
index c5d120e1accc30a1f22d504e39307049f7e776a6..38cda3e5d7ec204facb717f5352c2fe9898c7d0e 100644 (file)
@@ -17,7 +17,6 @@
 
 #include <string>
 #include <vector>
-#include "include/memory.h"
 
 #include "osd/osd_types.h"
 #include "include/object.h"
@@ -77,7 +76,7 @@ protected:
 
   RWLock access_lock;
   /// Type of returned paths
-  typedef ceph::shared_ptr<Path> IndexedPath;
+  typedef std::shared_ptr<Path> IndexedPath;
 
   static IndexedPath get_testing_path(string path, coll_t collection) {
     return std::make_shared<Path>(path, collection);
index aaabdebd23ff90f2202fd0f054f31657eefc882f..3bb2cb538b43459fbe498a7f793c1f8858eb54bf 100644 (file)
@@ -7,7 +7,6 @@
 #include <set>
 #include <map>
 #include <string>
-#include "include/memory.h"
 #include <vector>
 
 #include "os/ObjectMap.h"
index ba189ff0656788c655ec8b0cdaf77ba29d0ef9e8..7746483c3d3ab8ccc3634a950aa01915e0849363 100644 (file)
@@ -8,7 +8,6 @@
 #include <string>
 
 #include <vector>
-#include "include/memory.h"
 #include <boost/scoped_ptr.hpp>
 
 #include "os/ObjectMap.h"
@@ -365,7 +364,7 @@ public:
                                      const string &in);
 private:
   /// Implicit lock on Header->seq
-  typedef ceph::shared_ptr<_Header> Header;
+  typedef std::shared_ptr<_Header> Header;
   Mutex cache_lock;
   SimpleLRU<ghobject_t, _Header> caches;
 
@@ -405,12 +404,12 @@ private:
     Header header;
 
     /// parent_iter == NULL iff no parent
-    ceph::shared_ptr<DBObjectMapIteratorImpl> parent_iter;
+    std::shared_ptr<DBObjectMapIteratorImpl> parent_iter;
     KeyValueDB::Iterator key_iter;
     KeyValueDB::Iterator complete_iter;
 
     /// cur_iter points to currently valid iterator
-    ceph::shared_ptr<ObjectMapIteratorImpl> cur_iter;
+    std::shared_ptr<ObjectMapIteratorImpl> cur_iter;
     int r;
 
     /// init() called, key_iter, complete_iter, parent_iter filled in
@@ -456,7 +455,7 @@ private:
     int adjust();
   };
 
-  typedef ceph::shared_ptr<DBObjectMapIteratorImpl> DBObjectMapIterator;
+  typedef std::shared_ptr<DBObjectMapIteratorImpl> DBObjectMapIterator;
   DBObjectMapIterator _get_iterator(Header header) {
     return std::make_shared<DBObjectMapIteratorImpl>(this, header);
   }
index 723cc722f4b9d797091e7ad2334f23c807c3e612..e81c5a47d8bf5a501ec980e5532569427df38f55 100644 (file)
@@ -70,7 +70,7 @@ public:
     cct->_conf->remove_observer(this);
     delete[] registry;
   }
-  typedef ceph::shared_ptr<FD> FDRef;
+  typedef std::shared_ptr<FD> FDRef;
 
   FDRef lookup(const ghobject_t &hoid) {
     int registry_id = hoid.hobj.get_hash() % registry_shards;
index 88e17eb156b729c430a26abecca3bc5c196869ff..730950264cac2bb9eab546b01008a8d0e26bd370 100644 (file)
@@ -12,7 +12,6 @@
  *
  */
 
-#include "include/memory.h"
 #include "include/unordered_map.h"
 
 #if defined(__FreeBSD__)
index 4162ffa5f347ff671fbc4f4d778ad2bdd0b06cec..e56ed0f8daf1d08551423eac5578cb7a83ba35fd 100644 (file)
@@ -14,7 +14,6 @@
 #ifndef OS_INDEXMANAGER_H
 #define OS_INDEXMANAGER_H
 
-#include "include/memory.h"
 #include "include/unordered_map.h"
 
 #include "common/Mutex.h"
index 2f2d2e0f8feab27a9972d2a94cd292aba44009b6..0d068260af9fff5143593c807bc6b53b80b8c582 100644 (file)
@@ -20,7 +20,6 @@
 #include <map>
 #include <set>
 #include <vector>
-#include "include/memory.h"
 #include <exception>
 
 #include "osd/osd_types.h"
index 5c71dacafe1120d1556d9d120ca0716f7d471587..b10b0bb8e3b9884dfc31d02d517545230af3f4ea 100644 (file)
@@ -17,7 +17,6 @@
 
 #include "include/unordered_map.h"
 #include <boost/tuple/tuple.hpp>
-#include "include/memory.h"
 #include "common/Formatter.h"
 #include "common/hobject.h"
 #include "include/interval_set.h"
index 3f8e959964f51fe7f17586c141eb0961cbfc57ba..fa1c88a6a5b9364d495917fb4034f5e80ffe7992 100644 (file)
@@ -25,7 +25,6 @@
 
 #include "include/assert.h"
 #include "include/unordered_map.h"
-#include "include/memory.h"
 #include "common/Finisher.h"
 #include "common/RWLock.h"
 #include "common/Throttle.h"
index 71266a635a561752b82772bfd9e30832b91895eb..5e6d30ff6a230acf754a93f9460fd5f89e92ca69 100644 (file)
@@ -24,7 +24,6 @@
 #include "include/types.h"
 #include "include/stringify.h"
 #include "include/unordered_map.h"
-#include "include/memory.h"
 #include "common/errno.h"
 #include "MemStore.h"
 #include "include/compat.h"
index d73b59afe1dea82be08d2543ad0ac122d42a9569..c0b8978c8b480b32cb71a5d535d5b87798f2d6b2 100644 (file)
@@ -20,7 +20,6 @@
 #include <boost/intrusive_ptr.hpp>
 
 #include "include/unordered_map.h"
-#include "include/memory.h"
 #include "common/Finisher.h"
 #include "common/RefCountedObj.h"
 #include "common/RWLock.h"
index 1627741a10841f39baa14ba983c51020b1d12bdf..610e0ff451d06d402825674dc3cd77a60d0f4198 100644 (file)
@@ -159,7 +159,7 @@ public:
   friend std::ostream& operator<<(std::ostream& out, const HashInfo& hi);
 };
 
-typedef ceph::shared_ptr<HashInfo> HashInfoRef;
+typedef std::shared_ptr<HashInfo> HashInfoRef;
 
 bool is_hinfo_key_string(const std::string &key);
 const std::string &get_hinfo_key();
index c4cf9fcea95551d7644fe49c3dc256d5da2dc46f..eccbe601c2118b9794ae0c6f833caa9e18d9404b 100644 (file)
@@ -46,7 +46,6 @@
 #include <atomic>
 #include <map>
 #include <memory>
-#include "include/memory.h"
 
 #include "include/unordered_map.h"
 
index e18407fc022b78d70c9117bda5018e13d3191832..6c7b1362a953f7173e6f21f674766c747e9e93ee 100644 (file)
@@ -33,7 +33,7 @@
 #include <list>
 #include <set>
 #include <map>
-#include "include/memory.h"
+#include <memory>
 #include "include/btree_map.h"
 
 // forward declaration
@@ -524,21 +524,21 @@ private:
     CEPH_FEATUREMASK_SERVER_NAUTILUS;
 
   struct addrs_s {
-    mempool::osdmap::vector<ceph::shared_ptr<entity_addrvec_t> > client_addrs;
-    mempool::osdmap::vector<ceph::shared_ptr<entity_addr_t> > cluster_addr;
-    mempool::osdmap::vector<ceph::shared_ptr<entity_addr_t> > hb_back_addr;
-    mempool::osdmap::vector<ceph::shared_ptr<entity_addr_t> > hb_front_addr;
+    mempool::osdmap::vector<std::shared_ptr<entity_addrvec_t> > client_addrs;
+    mempool::osdmap::vector<std::shared_ptr<entity_addr_t> > cluster_addr;
+    mempool::osdmap::vector<std::shared_ptr<entity_addr_t> > hb_back_addr;
+    mempool::osdmap::vector<std::shared_ptr<entity_addr_t> > hb_front_addr;
   };
-  ceph::shared_ptr<addrs_s> osd_addrs;
+  std::shared_ptr<addrs_s> osd_addrs;
 
   entity_addr_t _blank_addr;
   entity_addrvec_t _blank_addrvec;
 
   mempool::osdmap::vector<__u32>   osd_weight;   // 16.16 fixed point, 0x10000 = "in", 0 = "out"
   mempool::osdmap::vector<osd_info_t> osd_info;
-  ceph::shared_ptr<PGTempMap> pg_temp;  // temp pg mapping (e.g. while we rebuild)
-  ceph::shared_ptr< mempool::osdmap::map<pg_t,int32_t > > primary_temp;  // temp primary mapping (e.g. while we rebuild)
-  ceph::shared_ptr< mempool::osdmap::vector<__u32> > osd_primary_affinity; ///< 16.16 fixed point, 0x10000 = baseline
+  std::shared_ptr<PGTempMap> pg_temp;  // temp pg mapping (e.g. while we rebuild)
+  std::shared_ptr< mempool::osdmap::map<pg_t,int32_t > > primary_temp;  // temp primary mapping (e.g. while we rebuild)
+  std::shared_ptr< mempool::osdmap::vector<__u32> > osd_primary_affinity; ///< 16.16 fixed point, 0x10000 = baseline
 
   // remap (post-CRUSH, pre-up)
   mempool::osdmap::map<pg_t,mempool::osdmap::vector<int32_t>> pg_upmap; ///< remap pg
@@ -549,7 +549,7 @@ private:
   mempool::osdmap::map<string,map<string,string> > erasure_code_profiles;
   mempool::osdmap::map<string,int64_t> name_pool;
 
-  ceph::shared_ptr< mempool::osdmap::vector<uuid_d> > osd_uuid;
+  std::shared_ptr< mempool::osdmap::vector<uuid_d> > osd_uuid;
   mempool::osdmap::vector<osd_xinfo_t> osd_xinfo;
 
   mempool::osdmap::unordered_map<entity_addr_t,utime_t> blacklist;
@@ -588,7 +588,7 @@ private:
   bool have_crc() const { return crc_defined; }
   uint32_t get_crc() const { return crc; }
 
-  ceph::shared_ptr<CrushWrapper> crush;       // hierarchical map
+  std::shared_ptr<CrushWrapper> crush;       // hierarchical map
 private:
   uint32_t crush_version = 1;
 
@@ -1474,7 +1474,7 @@ public:
 WRITE_CLASS_ENCODER_FEATURES(OSDMap)
 WRITE_CLASS_ENCODER_FEATURES(OSDMap::Incremental)
 
-typedef ceph::shared_ptr<const OSDMap> OSDMapRef;
+typedef std::shared_ptr<const OSDMap> OSDMapRef;
 
 inline ostream& operator<<(ostream& out, const OSDMap& m) {
   m.print_oneline_summary(out);
index 70b7184ad65ac7a2480a9330b0b7b3cfafd9ab9d..51e4403a1a404bbcc473106061ab6fcbeff0c263 100644 (file)
@@ -5841,7 +5841,7 @@ struct FlushState {
     pg->unlock();
   }
 };
-typedef ceph::shared_ptr<FlushState> FlushStateRef;
+typedef std::shared_ptr<FlushState> FlushStateRef;
 
 void PG::start_flush(ObjectStore::Transaction *t)
 {
index 31cda1b7128cfb6b3dbb78b4471a7d2d5483cfc0..c206e5a65c5952f8e4331cea0e174c4292428ff2 100644 (file)
@@ -25,7 +25,6 @@
 #include <boost/scoped_ptr.hpp>
 #include <boost/circular_buffer.hpp>
 #include <boost/container/flat_set.hpp>
-#include "include/memory.h"
 #include "include/mempool.h"
 
 // re-include our assert to clobber boost's
index 51c35a81180273c864117d1c65ec39d3adfd9b55..370694a7421f229a65fda74c73a0287d2752dcc0 100644 (file)
@@ -35,7 +35,7 @@ struct inconsistent_obj_wrapper;
 //forward declaration
 class OSDMap;
 class PGLog;
-typedef ceph::shared_ptr<const OSDMap> OSDMapRef;
+typedef std::shared_ptr<const OSDMap> OSDMapRef;
 
  /**
   * PGBackend
index a3236de64fb69247a14e79e51d14a75a2e4b216f..c698a77215297eb8bfa53ed703d47b3a6a196bbd 100644 (file)
@@ -66,7 +66,7 @@ public:
     return desc;
   }
 };
-typedef ceph::shared_ptr<PGPeeringEvent> PGPeeringEventRef;
+typedef std::shared_ptr<PGPeeringEvent> PGPeeringEventRef;
 
 struct MInfoRec : boost::statechart::event< MInfoRec > {
   pg_shard_t from;
index ec3f57319a0475566b8a5c2e4a6c5df33afd7963..5d0315972c041eba04cc9ec095aee3a445c39a24 100644 (file)
@@ -117,7 +117,7 @@ public:
   };
 
   struct CopyOp;
-  typedef ceph::shared_ptr<CopyOp> CopyOpRef;
+  typedef std::shared_ptr<CopyOp> CopyOpRef;
 
   struct CopyOp {
     CopyCallback *cb;
@@ -210,7 +210,7 @@ public:
        user_version(0), data_offset(0),
        canceled(false) { }
   };
-  typedef ceph::shared_ptr<ProxyReadOp> ProxyReadOpRef;
+  typedef std::shared_ptr<ProxyReadOp> ProxyReadOpRef;
 
   struct ProxyWriteOp {
     OpContext *ctx;
@@ -231,7 +231,7 @@ public:
        canceled(false),
         reqid(_reqid) { }
   };
-  typedef ceph::shared_ptr<ProxyWriteOp> ProxyWriteOpRef;
+  typedef std::shared_ptr<ProxyWriteOp> ProxyWriteOpRef;
 
   struct FlushOp {
     ObjectContextRef obc;       ///< obc we are flushing
@@ -253,7 +253,7 @@ public:
        blocking(false), removal(false), chunks(0) {}
     ~FlushOp() { assert(!on_flush); }
   };
-  typedef ceph::shared_ptr<FlushOp> FlushOpRef;
+  typedef std::shared_ptr<FlushOp> FlushOpRef;
 
   boost::scoped_ptr<PGBackend> pgbackend;
   PGBackend *get_pgbackend() override {
index 7c4d1a17980aae62c7409b9966b6d98ba8a2a8e2..6dbba861a9a6283c5fe34db18654ca5077c0ec64 100644 (file)
@@ -16,7 +16,6 @@
 #define REPBACKEND_H
 
 #include "PGBackend.h"
-#include "include/memory.h"
 
 struct C_ReplicatedBackend_OnPullComplete;
 class ReplicatedBackend : public PGBackend {
@@ -412,7 +411,7 @@ private:
     RepModify() : committed(false), ackerosd(-1),
                  epoch_started(0) {}
   };
-  typedef ceph::shared_ptr<RepModify> RepModifyRef;
+  typedef std::shared_ptr<RepModify> RepModifyRef;
 
   struct C_OSD_RepModifyCommit;
 
index 08a54b74262327fd3419c529a8d080a161e756ec..65408c276dce22c28ac0c5403bf1ce1b187fd92c 100644 (file)
@@ -14,7 +14,6 @@
 #ifndef CEPH_WATCH_H
 #define CEPH_WATCH_H
 
-#include "include/memory.h"
 #include <set>
 #include "msg/Connection.h"
 #include "include/Context.h"
@@ -32,12 +31,12 @@ struct ObjectContext;
 class MWatchNotify;
 
 class Watch;
-typedef ceph::shared_ptr<Watch> WatchRef;
-typedef ceph::weak_ptr<Watch> WWatchRef;
+typedef std::shared_ptr<Watch> WatchRef;
+typedef std::weak_ptr<Watch> WWatchRef;
 
 class Notify;
-typedef ceph::shared_ptr<Notify> NotifyRef;
-typedef ceph::weak_ptr<Notify> WNotifyRef;
+typedef std::shared_ptr<Notify> NotifyRef;
+typedef std::weak_ptr<Notify> WNotifyRef;
 
 struct CancelableContext;
 
@@ -154,7 +153,7 @@ class Watch {
 
   OSDService *osd;
   boost::intrusive_ptr<PrimaryLogPG> pg;
-  ceph::shared_ptr<ObjectContext> obc;
+  std::shared_ptr<ObjectContext> obc;
 
   std::map<uint64_t, NotifyRef> in_progress_notifies;
 
@@ -171,7 +170,7 @@ class Watch {
 
   Watch(
     PrimaryLogPG *pg, OSDService *osd,
-    ceph::shared_ptr<ObjectContext> obc, uint32_t timeout,
+    std::shared_ptr<ObjectContext> obc, uint32_t timeout,
     uint64_t cookie, entity_name_t entity,
     const entity_addr_t& addr);
 
@@ -210,7 +209,7 @@ public:
   std::ostream& gen_dbg_prefix(std::ostream& out);
   static WatchRef makeWatchRef(
     PrimaryLogPG *pg, OSDService *osd,
-    ceph::shared_ptr<ObjectContext> obc, uint32_t timeout, uint64_t cookie, entity_name_t entity, const entity_addr_t &addr);
+    std::shared_ptr<ObjectContext> obc, uint32_t timeout, uint64_t cookie, entity_name_t entity, const entity_addr_t &addr);
   void set_self(WatchRef _self) {
     self = _self;
   }
@@ -218,7 +217,7 @@ public:
   /// Does not grant a ref count!
   boost::intrusive_ptr<PrimaryLogPG> get_pg() { return pg; }
 
-  ceph::shared_ptr<ObjectContext> get_obc() { return obc; }
+  std::shared_ptr<ObjectContext> get_obc() { return obc; }
 
   uint64_t get_cookie() const { return cookie; }
   entity_name_t get_entity() const { return entity; }
index 9cc451c4cbf1d43c7cbde7e42891148223ee30a6..79ef12b9f594c4b2320ef0b38f66ec63c9319c9f 100644 (file)
@@ -37,7 +37,7 @@ struct ObjectState {
     : oi(oi_), exists(exists_) {}
 };
 
-typedef ceph::shared_ptr<ObjectContext> ObjectContextRef;
+typedef std::shared_ptr<ObjectContext> ObjectContextRef;
 
 struct ObjectContext {
   ObjectState obs;
index de0040014caa96689dfeb62476cd1dcd550bfe58..1ade94a21a1e39cc39c3230028334df7d579eba3 100644 (file)
@@ -2755,8 +2755,8 @@ public:
     int new_up_primary,                         ///< [in] up primary of osdmap
     const vector<int> &old_up,                  ///< [in] up as of lastmap
     const vector<int> &new_up,                  ///< [in] up as of osdmap
-    ceph::shared_ptr<const OSDMap> osdmap,  ///< [in] current map
-    ceph::shared_ptr<const OSDMap> lastmap, ///< [in] last map
+    std::shared_ptr<const OSDMap> osdmap,  ///< [in] current map
+    std::shared_ptr<const OSDMap> lastmap, ///< [in] last map
     pg_t pgid                                   ///< [in] pgid for pg
     );
 
@@ -2775,8 +2775,8 @@ public:
     const vector<int> &new_up,                  ///< [in] up as of osdmap
     epoch_t same_interval_since,                ///< [in] as of osdmap
     epoch_t last_epoch_clean,                   ///< [in] current
-    ceph::shared_ptr<const OSDMap> osdmap,      ///< [in] current map
-    ceph::shared_ptr<const OSDMap> lastmap,     ///< [in] last map
+    std::shared_ptr<const OSDMap> osdmap,      ///< [in] current map
+    std::shared_ptr<const OSDMap> lastmap,     ///< [in] last map
     pg_t pgid,                                  ///< [in] pgid for pg
     IsPGRecoverablePredicate *could_have_gone_active, /// [in] predicate whether the pg can be active
     PastIntervals *past_intervals,              ///< [out] intervals
index 6542b5bf87951de7285651d96f1863fa465684f5..f66295eb797cb0f329c9bfaa2fcce8f8bb87b26e 100644 (file)
@@ -437,7 +437,7 @@ class RGWDataChangesLog {
     }
   };
 
-  typedef ceph::shared_ptr<ChangeStatus> ChangeStatusPtr;
+  typedef std::shared_ptr<ChangeStatus> ChangeStatusPtr;
 
   lru_map<rgw_bucket_shard, ChangeStatusPtr> changes;
 
index bf6570b1dd40ea13649ff42c8a0ce531dc73cd81..971a14339451b77b76de89936979cab54c0775cb 100644 (file)
@@ -4,7 +4,6 @@
 #include "KeyValueDBMemory.h"
 #include <map>
 #include <set>
-#include "include/memory.h"
 #include <iostream>
 
 using namespace std;
@@ -236,7 +235,7 @@ int KeyValueDBMemory::rm_range_keys(const string &prefix, const string &start, c
 }
 
 KeyValueDB::WholeSpaceIterator KeyValueDBMemory::get_wholespace_iterator() {
-  return ceph::shared_ptr<KeyValueDB::WholeSpaceIteratorImpl>(
+  return std::shared_ptr<KeyValueDB::WholeSpaceIteratorImpl>(
     new WholeSpaceMemIterator(this)
   );
 }
index f82762d4fcbe1985a8d058cb09768def3f074849..415399e0a30dce4e44472080512b126bc23eee4b 100644 (file)
@@ -3,7 +3,6 @@
 #include <map>
 #include <set>
 #include <string>
-#include "include/memory.h"
 
 #include "kv/KeyValueDB.h"
 #include "include/buffer.h"
index 6e7fc8d2fa775ca8ab48eaa7608d76c1142e9631..a97cb9fb93c80c5cde4cd3f91fc6403901571885 100644 (file)
@@ -6,7 +6,6 @@
 #include <dirent.h>
 #include <string>
 #include <vector>
-#include "include/memory.h"
 #include <boost/scoped_ptr.hpp>
 #include <iostream>
 #include <sstream>
index 8c2bd0f648608f81cdb0bfa96695a6abca81587a..105c6dcb42dda9c6efc6215f95259e3fe37f379f 100644 (file)
@@ -10,7 +10,6 @@
 * License version 2.1, as published by the Free Software
 * Foundation. See file COPYING.
 */
-#include "include/memory.h"
 #include <map>
 #include <set>
 #include <deque>
index d194db1865c3df142461977d130306e4a137d847..ddf23cffc7f5d0b204c669d989e687b0377fa6da 100644 (file)
@@ -1,5 +1,4 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-#include "include/memory.h"
 #include <map>
 #include <set>
 #include <boost/scoped_ptr.hpp>
index 4dccb271da502a7c39dbf6f8ffec4f5511a3ab8b..4e8a21f00fbfc6e2753625c270ec1ebf8167defc 100644 (file)
@@ -19,7 +19,6 @@
  *
  */
 
-#include "include/memory.h"
 #include <limits.h>
 #include <errno.h>
 #include <sys/uio.h>
@@ -2916,7 +2915,7 @@ TEST(BufferList, TestCloneNonShareable) {
 
 TEST(BufferList, TestCopyAll) {
   const static size_t BIG_SZ = 10737414;
-  ceph::shared_ptr <unsigned char> big(
+  std::shared_ptr <unsigned char> big(
       (unsigned char*)malloc(BIG_SZ), free);
   unsigned char c = 0;
   for (size_t i = 0; i < BIG_SZ; ++i) {
@@ -2928,7 +2927,7 @@ TEST(BufferList, TestCopyAll) {
   bufferlist bl2;
   i.copy_all(bl2);
   ASSERT_EQ(bl2.length(), BIG_SZ);
-  ceph::shared_ptr <unsigned char> big2(
+  std::shared_ptr <unsigned char> big2(
       (unsigned char*)malloc(BIG_SZ), free);
   bl2.copy(0, BIG_SZ, (char*)big2.get());
   ASSERT_EQ(memcmp(big.get(), big2.get(), BIG_SZ), 0);
@@ -2936,7 +2935,7 @@ TEST(BufferList, TestCopyAll) {
 
 TEST(BufferList, InvalidateCrc) {
   const static size_t buffer_size = 262144;
-  ceph::shared_ptr <unsigned char> big(
+  std::shared_ptr <unsigned char> big(
       (unsigned char*)malloc(buffer_size), free);
   unsigned char c = 0;
   char* ptr = (char*) big.get();
index 7b7602ffe08ba4dec359de6102b22a36824675a7..026c99fe70b3b205009886f42838cda790611174 100644 (file)
@@ -30,7 +30,7 @@ class SharedLRUTest : public SharedLRU<unsigned int, int> {
 public:
   Mutex &get_lock() { return lock; }
   Cond &get_cond() { return cond; }
-  map<unsigned int, pair< ceph::weak_ptr<int>, int* > > &get_weak_refs() {
+  map<unsigned int, pair< std::weak_ptr<int>, int* > > &get_weak_refs() {
     return weak_refs;
   }
 };
@@ -43,7 +43,7 @@ public:
     SharedLRUTest &cache;
     unsigned int key;
     int value;
-    ceph::shared_ptr<int> ptr;
+    std::shared_ptr<int> ptr;
     enum in_method_t { LOOKUP, LOWER_BOUND } in_method;
 
     Thread_wait(SharedLRUTest& _cache, unsigned int _key, 
@@ -59,7 +59,7 @@ public:
         ptr = cache.lower_bound(key);
         break;
       case LOOKUP:
-        ptr = ceph::shared_ptr<int>(new int);
+        ptr = std::shared_ptr<int>(new int);
         *ptr = value;
         ptr = cache.lookup(key);
         break;
@@ -103,13 +103,13 @@ TEST_F(SharedLRU_all, add) {
   int value1 = 2;
   bool existed = false;
   {
-    ceph::shared_ptr<int> ptr = cache.add(key, new int(value1), &existed);
+    std::shared_ptr<int> ptr = cache.add(key, new int(value1), &existed);
     ASSERT_EQ(value1, *ptr);
     ASSERT_FALSE(existed);
   }
   {
     int value2 = 3;
-    ceph::shared_ptr<int> ptr = cache.add(key, new int(value2), &existed);
+    std::shared_ptr<int> ptr = cache.add(key, new int(value2), &existed);
     ASSERT_EQ(value1, *ptr);
     ASSERT_TRUE(existed);
   }
@@ -122,7 +122,7 @@ TEST_F(SharedLRU_all, empty) {
   ASSERT_TRUE(cache.empty());
   {
     int value1 = 2;
-    ceph::shared_ptr<int> ptr = cache.add(key, new int(value1), &existed);
+    std::shared_ptr<int> ptr = cache.add(key, new int(value1), &existed);
     ASSERT_EQ(value1, *ptr);
     ASSERT_FALSE(existed);
   }
@@ -167,7 +167,7 @@ TEST_F(SharedLRU_all, wait_lookup) {
   int value = 2;
 
   {
-    ceph::shared_ptr<int> ptr(new int);
+    std::shared_ptr<int> ptr(new int);
     cache.get_weak_refs()[key] = make_pair(ptr, &*ptr);
   }
   EXPECT_FALSE(cache.get_weak_refs()[key].first.lock());
@@ -193,7 +193,7 @@ TEST_F(SharedLRU_all, wait_lookup_or_create) {
   int value = 2;
 
   {
-    ceph::shared_ptr<int> ptr(new int);
+    std::shared_ptr<int> ptr(new int);
     cache.get_weak_refs()[key] = make_pair(ptr, &*ptr);
   }
   EXPECT_FALSE(cache.get_weak_refs()[key].first.lock());
@@ -238,7 +238,7 @@ TEST_F(SharedLRU_all, wait_lower_bound) {
   ASSERT_TRUE(cache.add(other_key, new int(other_value)).get());
 
   {
-    ceph::shared_ptr<int> ptr(new int);
+    std::shared_ptr<int> ptr(new int);
     cache.get_weak_refs()[key] = make_pair(ptr, &*ptr);
   }
   EXPECT_FALSE(cache.get_weak_refs()[key].first.lock());
@@ -270,15 +270,15 @@ TEST_F(SharedLRU_all, get_next) {
     SharedLRUTest cache;
 
     const unsigned int key2 = 333;
-    ceph::shared_ptr<int> ptr2 = cache.lookup_or_create(key2);
+    std::shared_ptr<int> ptr2 = cache.lookup_or_create(key2);
     const int value2 = *ptr2 = 400;
 
     // entries with expired pointers are silently ignored
     const unsigned int key_gone = 222;
-    cache.get_weak_refs()[key_gone] = make_pair(ceph::shared_ptr<int>(), (int*)0);
+    cache.get_weak_refs()[key_gone] = make_pair(std::shared_ptr<int>(), (int*)0);
 
     const unsigned int key1 = 111;
-    ceph::shared_ptr<int> ptr1 = cache.lookup_or_create(key1);
+    std::shared_ptr<int> ptr1 = cache.lookup_or_create(key1);
     const int value1 = *ptr1 = 800;
 
     pair<unsigned int, int> i;
@@ -297,11 +297,11 @@ TEST_F(SharedLRU_all, get_next) {
   {
     SharedLRUTest cache;
     const unsigned int key1 = 111;
-    ceph::shared_ptr<int> *ptr1 = new shared_ptr<int>(cache.lookup_or_create(key1));
+    std::shared_ptr<int> *ptr1 = new shared_ptr<int>(cache.lookup_or_create(key1));
     const unsigned int key2 = 222;
-    ceph::shared_ptr<int> ptr2 = cache.lookup_or_create(key2);
+    std::shared_ptr<int> ptr2 = cache.lookup_or_create(key2);
 
-    pair<unsigned int, ceph::shared_ptr<int> > i;
+    pair<unsigned int, std::shared_ptr<int> > i;
     EXPECT_TRUE(cache.get_next(i.first, &i));
     EXPECT_EQ(key1, i.first);
     delete ptr1;
@@ -315,7 +315,7 @@ TEST_F(SharedLRU_all, clear) {
   unsigned int key = 1;
   int value = 2;
   {
-    ceph::shared_ptr<int> ptr = cache.add(key, new int(value));
+    std::shared_ptr<int> ptr = cache.add(key, new int(value));
     ASSERT_EQ(value, *cache.lookup(key));
   }
   ASSERT_TRUE(cache.lookup(key).get());
@@ -323,7 +323,7 @@ TEST_F(SharedLRU_all, clear) {
   ASSERT_FALSE(cache.lookup(key));
 
   {
-    ceph::shared_ptr<int> ptr = cache.add(key, new int(value));
+    std::shared_ptr<int> ptr = cache.add(key, new int(value));
   }
   ASSERT_TRUE(cache.lookup(key).get());
   cache.clear(key);
@@ -334,14 +334,14 @@ TEST_F(SharedLRU_all, clear_all) {
   unsigned int key = 1;
   int value = 2;
   {
-    ceph::shared_ptr<int> ptr = cache.add(key, new int(value));
+    std::shared_ptr<int> ptr = cache.add(key, new int(value));
     ASSERT_EQ(value, *cache.lookup(key));
   }
   ASSERT_TRUE(cache.lookup(key).get());
   cache.clear();
   ASSERT_FALSE(cache.lookup(key));
 
-  ceph::shared_ptr<int> ptr2 = cache.add(key, new int(value));
+  std::shared_ptr<int> ptr2 = cache.add(key, new int(value));
   ASSERT_TRUE(cache.lookup(key).get());
   cache.clear();
   ASSERT_TRUE(cache.lookup(key).get());
@@ -352,7 +352,7 @@ TEST(SharedCache_all, add) {
   SharedLRU<int, int> cache;
   unsigned int key = 1;
   int value = 2;
-  ceph::shared_ptr<int> ptr = cache.add(key, new int(value));
+  std::shared_ptr<int> ptr = cache.add(key, new int(value));
   ASSERT_EQ(ptr, cache.lookup(key));
   ASSERT_EQ(value, *cache.lookup(key));
 }
@@ -362,11 +362,11 @@ TEST(SharedCache_all, lru) {
   SharedLRU<int, int> cache(NULL, SIZE);
 
   bool existed = false;
-  ceph::shared_ptr<int> ptr = cache.add(0, new int(0), &existed);
+  std::shared_ptr<int> ptr = cache.add(0, new int(0), &existed);
   ASSERT_FALSE(existed);
   {
     int *tmpint = new int(0);
-    ceph::shared_ptr<int> ptr2 = cache.add(0, tmpint, &existed);
+    std::shared_ptr<int> ptr2 = cache.add(0, tmpint, &existed);
     ASSERT_TRUE(existed);
     delete tmpint;
   }
@@ -385,9 +385,9 @@ TEST(SharedCache_all, lru) {
 
   cache.purge(0);
   ASSERT_FALSE(cache.lookup(0));
-  ceph::shared_ptr<int> ptr2 = cache.add(0, new int(0), &existed);
+  std::shared_ptr<int> ptr2 = cache.add(0, new int(0), &existed);
   ASSERT_FALSE(ptr == ptr2);
-  ptr = ceph::shared_ptr<int>();
+  ptr = std::shared_ptr<int>();
   ASSERT_TRUE(cache.lookup(0).get());
 }
 
index ee61e5cb6e5cb7d528be384a9cfb57d285b2102b..765cc814d8722ce91a9530265f9558d3bc794e97 100644 (file)
@@ -29,7 +29,7 @@
 class SharedPtrRegistryTest : public SharedPtrRegistry<unsigned int, int> {
 public:
   Mutex &get_lock() { return lock; }
-  map<unsigned int, pair<ceph::weak_ptr<int>, int*> > &get_contents() {
+  map<unsigned int, pair<std::weak_ptr<int>, int*> > &get_contents() {
     return contents;
   }
 };
@@ -42,7 +42,7 @@ public:
     SharedPtrRegistryTest &registry;
     unsigned int key;
     int value;
-    ceph::shared_ptr<int> ptr;
+    std::shared_ptr<int> ptr;
     enum in_method_t { LOOKUP, LOOKUP_OR_CREATE } in_method;
 
     Thread_wait(SharedPtrRegistryTest& _registry, unsigned int _key, int _value, in_method_t _in_method) : 
@@ -62,7 +62,7 @@ public:
          ptr = registry.lookup_or_create(key);
        break;
       case LOOKUP:
-       ptr = ceph::shared_ptr<int>(new int);
+       ptr = std::shared_ptr<int>(new int);
        *ptr = value;
        ptr = registry.lookup(key);
        break;
@@ -102,7 +102,7 @@ TEST_F(SharedPtrRegistry_all, lookup_or_create) {
   SharedPtrRegistryTest registry;
   unsigned int key = 1;
   int value = 2;
-  ceph::shared_ptr<int> ptr = registry.lookup_or_create(key);
+  std::shared_ptr<int> ptr = registry.lookup_or_create(key);
   *ptr = value;
   ASSERT_EQ(value, *registry.lookup_or_create(key));
 }
@@ -123,7 +123,7 @@ TEST_F(SharedPtrRegistry_all, wait_lookup_or_create) {
   {
     unsigned int key = 1;
     {
-      ceph::shared_ptr<int> ptr(new int);
+      std::shared_ptr<int> ptr(new int);
       registry.get_contents()[key] = make_pair(ptr, ptr.get());
     }
     EXPECT_FALSE(registry.get_contents()[key].first.lock());
@@ -143,7 +143,7 @@ TEST_F(SharedPtrRegistry_all, wait_lookup_or_create) {
     unsigned int key = 2;
     int value = 3;
     {
-      ceph::shared_ptr<int> ptr(new int);
+      std::shared_ptr<int> ptr(new int);
       registry.get_contents()[key] = make_pair(ptr, ptr.get());
     }
     EXPECT_FALSE(registry.get_contents()[key].first.lock());
@@ -156,7 +156,7 @@ TEST_F(SharedPtrRegistry_all, wait_lookup_or_create) {
     {
       int other_value = value + 1;
       unsigned int other_key = key + 1;
-      ceph::shared_ptr<int> ptr = registry.lookup_or_create<int>(other_key, other_value);
+      std::shared_ptr<int> ptr = registry.lookup_or_create<int>(other_key, other_value);
       EXPECT_TRUE(ptr.get());
       EXPECT_EQ(other_value, *ptr);
     }
@@ -172,7 +172,7 @@ TEST_F(SharedPtrRegistry_all, lookup) {
   SharedPtrRegistryTest registry;
   unsigned int key = 1;
   {
-    ceph::shared_ptr<int> ptr = registry.lookup_or_create(key);
+    std::shared_ptr<int> ptr = registry.lookup_or_create(key);
     int value = 2;
     *ptr = value;
     ASSERT_EQ(value, *registry.lookup(key));
@@ -186,7 +186,7 @@ TEST_F(SharedPtrRegistry_all, wait_lookup) {
   unsigned int key = 1;
   int value = 2;
   {
-    ceph::shared_ptr<int> ptr(new int);
+    std::shared_ptr<int> ptr(new int);
     registry.get_contents()[key] = make_pair(ptr, ptr.get());
   }
   EXPECT_FALSE(registry.get_contents()[key].first.lock());
@@ -215,15 +215,15 @@ TEST_F(SharedPtrRegistry_all, get_next) {
     SharedPtrRegistryTest registry;
 
     const unsigned int key2 = 333;
-    ceph::shared_ptr<int> ptr2 = registry.lookup_or_create(key2);
+    std::shared_ptr<int> ptr2 = registry.lookup_or_create(key2);
     const int value2 = *ptr2 = 400;
 
     // entries with expired pointers are silentely ignored
     const unsigned int key_gone = 222;
-    registry.get_contents()[key_gone] = make_pair(ceph::shared_ptr<int>(), (int*)0);
+    registry.get_contents()[key_gone] = make_pair(std::shared_ptr<int>(), (int*)0);
 
     const unsigned int key1 = 111;
-    ceph::shared_ptr<int> ptr1 = registry.lookup_or_create(key1);
+    std::shared_ptr<int> ptr1 = registry.lookup_or_create(key1);
     const int value1 = *ptr1 = 800;
 
     pair<unsigned int, int> i;
@@ -244,11 +244,11 @@ TEST_F(SharedPtrRegistry_all, get_next) {
     //
     SharedPtrRegistryTest registry;
     const unsigned int key1 = 111;
-    ceph::shared_ptr<int> *ptr1 = new ceph::shared_ptr<int>(registry.lookup_or_create(key1));
+    std::shared_ptr<int> *ptr1 = new std::shared_ptr<int>(registry.lookup_or_create(key1));
     const unsigned int key2 = 222;
-    ceph::shared_ptr<int> ptr2 = registry.lookup_or_create(key2);
+    std::shared_ptr<int> ptr2 = registry.lookup_or_create(key2);
     
-    pair<unsigned int, ceph::shared_ptr<int> > i;
+    pair<unsigned int, std::shared_ptr<int> > i;
     EXPECT_TRUE(registry.get_next(i.first, &i));
     EXPECT_EQ(key1, i.first);
     delete ptr1;
@@ -261,15 +261,15 @@ TEST_F(SharedPtrRegistry_all, remove) {
   {
     SharedPtrRegistryTest registry;
     const unsigned int key1 = 1;
-    ceph::shared_ptr<int> ptr1 = registry.lookup_or_create(key1);
+    std::shared_ptr<int> ptr1 = registry.lookup_or_create(key1);
     *ptr1 = 400;
     registry.remove(key1);
 
-    ceph::shared_ptr<int> ptr2 = registry.lookup_or_create(key1);
+    std::shared_ptr<int> ptr2 = registry.lookup_or_create(key1);
     *ptr2 = 500;
 
-    ptr1 = ceph::shared_ptr<int>();
-    ceph::shared_ptr<int> res = registry.lookup(key1);
+    ptr1 = std::shared_ptr<int>();
+    std::shared_ptr<int> res = registry.lookup(key1);
     assert(res);
     assert(res == ptr2);
     assert(*res == 500);
@@ -277,13 +277,13 @@ TEST_F(SharedPtrRegistry_all, remove) {
   {
     SharedPtrRegistryTest registry;
     const unsigned int key1 = 1;
-    ceph::shared_ptr<int> ptr1 = registry.lookup_or_create(key1, 400);
+    std::shared_ptr<int> ptr1 = registry.lookup_or_create(key1, 400);
     registry.remove(key1);
 
-    ceph::shared_ptr<int> ptr2 = registry.lookup_or_create(key1, 500);
+    std::shared_ptr<int> ptr2 = registry.lookup_or_create(key1, 500);
 
-    ptr1 = ceph::shared_ptr<int>();
-    ceph::shared_ptr<int> res = registry.lookup(key1);
+    ptr1 = std::shared_ptr<int>();
+    std::shared_ptr<int> res = registry.lookup(key1);
     assert(res);
     assert(res == ptr2);
     assert(*res == 500);
@@ -315,7 +315,7 @@ TEST_F(SharedPtrRegistry_destructor, destructor) {
   EXPECT_EQ(UNDEFINED, died);
   int key = 101;
   {
-    ceph::shared_ptr<TellDie> a = registry.lookup_or_create(key);
+    std::shared_ptr<TellDie> a = registry.lookup_or_create(key);
     EXPECT_EQ(NO, died);
     EXPECT_TRUE(a.get());
   }
index f323c6859c65c1999b055cdbd19dd1a58715adfe..f78a2824a25d956c5b1997222995522eabd91b08 100644 (file)
@@ -24,7 +24,6 @@
 #include <stdint.h>
 #include <sys/stat.h>
 #include <sys/types.h>
-#include "include/memory.h"
 
 using ceph::bufferlist;
 using std::cerr;
@@ -78,7 +77,7 @@ static int create_tempfile(const std::string &fname, const char *text)
         << get_temp_dir() << "'. " << cpp_strerror(err) << std::endl;
     return err;
   }
-  ceph::shared_ptr<FILE> fpp(fp, fclose);
+  std::shared_ptr<FILE> fpp(fp, fclose);
   if (unlink_idx >= MAX_FILES_TO_DELETE)
     return -ENOBUFS;
   if (unlink_idx == 0) {
index 7d799863c014a6645a79c287c58a22ca4192831a..d48bc04950bfbf89a40d6e9a02b567fccb37bc90 100644 (file)
@@ -126,7 +126,7 @@ const ContDesc &ObjectDesc::most_recent() {
 }
 
 void ObjectDesc::update(ContentsGenerator *gen, const ContDesc &next) {
-  layers.push_front(std::pair<ceph::shared_ptr<ContentsGenerator>, ContDesc>(ceph::shared_ptr<ContentsGenerator>(gen), next));
+  layers.push_front(std::pair<std::shared_ptr<ContentsGenerator>, ContDesc>(std::shared_ptr<ContentsGenerator>(gen), next));
   return;
 }
 
index 03d9c454b965c87d17d6d8d92c59288f3cbd9e6d..f73abe5291a3a77378d0a57dee0b477d723b96a4 100644 (file)
@@ -314,7 +314,7 @@ public:
   ObjectDesc(const ContDesc &init, ContentsGenerator *cont_gen)
     : exists(false), dirty(false),
       version(0) {
-    layers.push_front(std::pair<ceph::shared_ptr<ContentsGenerator>, ContDesc>(ceph::shared_ptr<ContentsGenerator>(cont_gen), init));
+    layers.push_front(std::pair<std::shared_ptr<ContentsGenerator>, ContDesc>(std::shared_ptr<ContentsGenerator>(cont_gen), init));
   }
 
   class iterator {
@@ -329,12 +329,12 @@ public:
 
     public:
       ContDesc cont;
-      ceph::shared_ptr<ContentsGenerator> gen;
+      std::shared_ptr<ContentsGenerator> gen;
       ContentsGenerator::iterator iter;
 
       ContState(
        const ContDesc &_cont,
-       ceph::shared_ptr<ContentsGenerator> _gen,
+       std::shared_ptr<ContentsGenerator> _gen,
        ContentsGenerator::iterator _iter)
        : size(_gen->get_length(_cont)), cont(_cont), gen(_gen), iter(_iter) {
        gen->get_ranges(cont, ranges);
@@ -516,7 +516,7 @@ public:
   std::string redirect_target;
   std::map<uint64_t, ChunkDesc> chunk_info;
 private:
-  std::list<std::pair<ceph::shared_ptr<ContentsGenerator>, ContDesc> > layers;
+  std::list<std::pair<std::shared_ptr<ContentsGenerator>, ContDesc> > layers;
 };
 
 #endif
index a59b0a404ecd7f9f615ea9c93f6312374aecc12b..93f3a74a878667dfed66de093e4888bdbae39abc 100644 (file)
@@ -19,7 +19,6 @@
 #include "Object.h"
 #include "TestOpStat.h"
 #include "test/librados/test.h"
-#include "include/memory.h"
 #include "common/sharedptr_registry.hpp"
 #include "common/errno.h"
 #include "osd/HitSet.h"
@@ -1209,7 +1208,7 @@ public:
   int snap;
   bool balance_reads;
 
-  ceph::shared_ptr<int> in_use;
+  std::shared_ptr<int> in_use;
 
   vector<bufferlist> results;
   vector<int> retvals;
@@ -1727,7 +1726,7 @@ public:
   librados::ObjectWriteOperation zero_write_op2;
   librados::ObjectWriteOperation op;
   vector<librados::AioCompletion *> comps;
-  ceph::shared_ptr<int> in_use;
+  std::shared_ptr<int> in_use;
   int last_finished;
   int outstanding;
 
@@ -1839,7 +1838,7 @@ public:
       context->update_object_version(oid, comps[tid]->get_version64());
       context->oid_in_use.erase(oid);
       context->oid_not_in_use.insert(oid);
-      in_use = ceph::shared_ptr<int>();
+      in_use = std::shared_ptr<int>();
       context->kick();
     }
   }
@@ -1863,7 +1862,7 @@ public:
   librados::ObjectReadOperation rd_op;
   librados::AioCompletion *comp;
   librados::AioCompletion *comp_racing_read = nullptr;
-  ceph::shared_ptr<int> in_use;
+  std::shared_ptr<int> in_use;
   int snap;
   int done;
   uint64_t version;
@@ -1995,7 +1994,7 @@ public:
   int snap;
   bool balance_reads;
 
-  ceph::shared_ptr<int> in_use;
+  std::shared_ptr<int> in_use;
 
   vector<bufferlist> results;
   vector<int> retvals;
@@ -2300,7 +2299,7 @@ public:
   librados::ObjectWriteOperation op;
   librados::ObjectReadOperation rd_op;
   librados::AioCompletion *comp;
-  ceph::shared_ptr<int> in_use;
+  std::shared_ptr<int> in_use;
   int done;
   int r;
   uint64_t offset;
@@ -2414,7 +2413,7 @@ public:
   librados::ObjectWriteOperation op;
   librados::ObjectReadOperation rd_op;
   librados::AioCompletion *comp;
-  ceph::shared_ptr<int> in_use;
+  std::shared_ptr<int> in_use;
   int done;
   int r;
   SetRedirectOp(int n,
@@ -2630,7 +2629,7 @@ public:
   librados::AioCompletion *completion;
   librados::ObjectWriteOperation op;
   string oid;
-  ceph::shared_ptr<int> in_use;
+  std::shared_ptr<int> in_use;
 
   TierPromoteOp(int n,
               RadosTestContext *context,
@@ -2838,7 +2837,7 @@ public:
   bool dirty;
   ObjectDesc old_value;
   int snap = 0;
-  ceph::shared_ptr<int> in_use;
+  std::shared_ptr<int> in_use;
 
   IsDirtyOp(int n,
            RadosTestContext *context,
@@ -2933,7 +2932,7 @@ public:
   bool blocking;
   int snap;
   bool can_fail;
-  ceph::shared_ptr<int> in_use;
+  std::shared_ptr<int> in_use;
 
   CacheFlushOp(int n,
               RadosTestContext *context,
@@ -3037,7 +3036,7 @@ public:
   librados::AioCompletion *completion;
   librados::ObjectReadOperation op;
   string oid;
-  ceph::shared_ptr<int> in_use;
+  std::shared_ptr<int> in_use;
 
   CacheEvictOp(int n,
               RadosTestContext *context,
index 777cbe73de6fadc1e10e9dbf5db4c6d694f1ea55..4f4e7dece237ef77e6181093e6e88b48872507c7 100644 (file)
@@ -131,11 +131,11 @@ for (unsigned i = 0; i < 4; ++i) {
   //
   int osd_id = 1;
   epoch_t epoch = 40;
-  ceph::shared_ptr<OSDMap> osdmap(new OSDMap());
+  std::shared_ptr<OSDMap> osdmap(new OSDMap());
   osdmap->set_max_osd(10);
   osdmap->set_state(osd_id, CEPH_OSD_EXISTS);
   osdmap->set_epoch(epoch);
-  ceph::shared_ptr<OSDMap> lastmap(new OSDMap());
+  std::shared_ptr<OSDMap> lastmap(new OSDMap());
   lastmap->set_max_osd(10);
   lastmap->set_state(osd_id, CEPH_OSD_EXISTS);
   lastmap->set_epoch(epoch);
@@ -282,7 +282,7 @@ for (unsigned i = 0; i < 4; ++i) {
   // PG is splitting
   //
   {
-    ceph::shared_ptr<OSDMap> osdmap(new OSDMap());
+    std::shared_ptr<OSDMap> osdmap(new OSDMap());
     osdmap->set_max_osd(10);
     osdmap->set_state(osd_id, CEPH_OSD_EXISTS);
     osdmap->set_epoch(epoch);
@@ -316,7 +316,7 @@ for (unsigned i = 0; i < 4; ++i) {
   // PG size has changed
   //
   {
-    ceph::shared_ptr<OSDMap> osdmap(new OSDMap());
+    std::shared_ptr<OSDMap> osdmap(new OSDMap());
     osdmap->set_max_osd(10);
     osdmap->set_state(osd_id, CEPH_OSD_EXISTS);
     osdmap->set_epoch(epoch);
@@ -393,7 +393,7 @@ for (unsigned i = 0; i < 4; ++i) {
     // The new osdmap is created so that it triggers the
     // bug.
     //
-    ceph::shared_ptr<OSDMap> osdmap(new OSDMap());
+    std::shared_ptr<OSDMap> osdmap(new OSDMap());
     osdmap->set_max_osd(10);
     osdmap->set_state(osd_id, CEPH_OSD_EXISTS);
     osdmap->set_epoch(epoch);
@@ -469,7 +469,7 @@ for (unsigned i = 0; i < 4; ++i) {
     new_acting.push_back(osd_id + 4);
     new_acting.push_back(osd_id + 5);
 
-    ceph::shared_ptr<OSDMap> lastmap(new OSDMap());
+    std::shared_ptr<OSDMap> lastmap(new OSDMap());
     lastmap->set_max_osd(10);
     lastmap->set_state(osd_id, CEPH_OSD_EXISTS);
     lastmap->set_epoch(epoch);
@@ -516,7 +516,7 @@ for (unsigned i = 0; i < 4; ++i) {
 
     epoch_t last_epoch_clean = epoch - 10;
 
-    ceph::shared_ptr<OSDMap> lastmap(new OSDMap());
+    std::shared_ptr<OSDMap> lastmap(new OSDMap());
     lastmap->set_max_osd(10);
     lastmap->set_state(osd_id, CEPH_OSD_EXISTS);
     lastmap->set_epoch(epoch);
index 7c1d19d46df9a317089ec7193bfad5163d14bbb2..4e7971153f245dceb5f93f99add87c0ce3860417 100644 (file)
@@ -69,7 +69,7 @@ int stress_test(uint64_t num_ops, uint64_t num_objs,
   obc.start();
 
   std::atomic<unsigned> outstanding_reads = { 0 };
-  vector<ceph::shared_ptr<op_data> > ops;
+  vector<std::shared_ptr<op_data> > ops;
   ObjectCacher::ObjectSet object_set(NULL, 0, 0);
   SnapContext snapc;
   ceph::buffer::ptr bp(max_op_len);
@@ -94,7 +94,7 @@ int stress_test(uint64_t num_ops, uint64_t num_objs,
     uint64_t length = random() % (std::max<uint64_t>(max_len - 1, 1)) + 1;
     std::string oid = "test" + stringify(random() % num_objs);
     bool is_read = random() < percent_reads * RAND_MAX;
-    ceph::shared_ptr<op_data> op(new op_data(oid, offset, length, is_read));
+    std::shared_ptr<op_data> op(new op_data(oid, offset, length, is_read));
     ops.push_back(op);
     std::cout << "op " << i << " " << (is_read ? "read" : "write")
              << " " << op->extent << "\n";
index 5cc99e454cbfe8db5fe595ac5332e0d3d1a006ce..217ae8102b2d74e56de7020efbae411a5537ebb2 100644 (file)
@@ -7,6 +7,7 @@
 #include "include/int_types.h"
 #include "include/rados/librados.hpp"
 #include <gtest/gtest.h>
+#include <memory>
 #include <set>
 
 namespace librbd {
index 9e22b5a16f8894a1cb20aa8ba9a9c8fddba83026..a73942d993050340974d7152de1814e9e2b5aec3 100644 (file)
@@ -1,5 +1,4 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-#include "include/memory.h"
 #include <map>
 #include <set>
 #include <boost/scoped_ptr.hpp>
@@ -40,7 +39,7 @@ class PausyAsyncMap : public MapCacher::StoreDriver<string, bufferlist> {
     virtual void operate(map<string, bufferlist> *store) = 0;
     virtual ~_Op() {}
   };
-  typedef ceph::shared_ptr<_Op> Op;
+  typedef std::shared_ptr<_Op> Op;
   struct Remove : public _Op {
     set<string> to_remove;
     explicit Remove(const set<string> &to_remove) : to_remove(to_remove) {}
@@ -584,7 +583,7 @@ public:
 class SnapMapperTest : public ::testing::Test {
 protected:
   boost::scoped_ptr< PausyAsyncMap > driver;
-  map<pg_t, ceph::shared_ptr<MapperVerifier> > mappers;
+  map<pg_t, std::shared_ptr<MapperVerifier> > mappers;
   uint32_t pgnum;
 
   void SetUp() override {
index 25d987ec2b2a762ceac4b1354a6605b24c4f8ebc..3b5edc253d167c45c3f5190f6c4d2d9284d9e532 100644 (file)
@@ -237,7 +237,7 @@ void usage(const char *n, po::options_description &d)
 }
 
 int update_osdmap(MonitorDBStore& store, version_t ver, bool copy,
-                 ceph::shared_ptr<CrushWrapper> crush,
+                 std::shared_ptr<CrushWrapper> crush,
                  MonitorDBStore::Transaction* t) {
   const string prefix("osdmap");
 
@@ -320,7 +320,7 @@ int rewrite_transaction(MonitorDBStore& store, int version,
 
   // load/extract the crush map
   int r = 0;
-  ceph::shared_ptr<CrushWrapper> crush(new CrushWrapper);
+  std::shared_ptr<CrushWrapper> crush(new CrushWrapper);
   if (crush_file.empty()) {
     bufferlist bl;
     r = store.get(prefix, store.combine_strings("full", good_version), bl);
index 3e746de9585900db0499d68e705e181d9aa2c904..b6d4bcaa64ad77dbdee57d55489909dfdc6aade4 100644 (file)
@@ -710,9 +710,9 @@ int JournalTool::recover_dentries(
     std::set<std::string> read_keys;
 
     // Compose list of potentially-existing dentries we would like to fetch
-    list<ceph::shared_ptr<EMetaBlob::fullbit> > const &fb_list =
+    list<std::shared_ptr<EMetaBlob::fullbit> > const &fb_list =
       lump.get_dfull();
-    for (list<ceph::shared_ptr<EMetaBlob::fullbit> >::const_iterator fbi =
+    for (list<std::shared_ptr<EMetaBlob::fullbit> >::const_iterator fbi =
         fb_list.begin(); fbi != fb_list.end(); ++fbi) {
       EMetaBlob::fullbit const &fb = *(*fbi);
 
@@ -759,7 +759,7 @@ int JournalTool::recover_dentries(
 
     // Compose list of dentries we will write back
     std::map<std::string, bufferlist> write_vals;
-    for (list<ceph::shared_ptr<EMetaBlob::fullbit> >::const_iterator fbi =
+    for (list<std::shared_ptr<EMetaBlob::fullbit> >::const_iterator fbi =
         fb_list.begin(); fbi != fb_list.end(); ++fbi) {
       EMetaBlob::fullbit const &fb = *(*fbi);
 
@@ -960,7 +960,7 @@ int JournalTool::recover_dentries(
    * important because clients use them to infer completeness
    * of directories
    */
-  for (list<ceph::shared_ptr<EMetaBlob::fullbit> >::const_iterator p =
+  for (list<std::shared_ptr<EMetaBlob::fullbit> >::const_iterator p =
        metablob.roots.begin(); p != metablob.roots.end(); ++p) {
     EMetaBlob::fullbit const &fb = *(*p);
     inodeno_t ino = fb.inode.ino;
index 6fde848dbc2bb41d6cf634ff748f8f53bd3d416c..ca4863fd8514606275ef3856cc92cd2f6ce8f7f5 100644 (file)
@@ -113,7 +113,7 @@ void Server::wait_clean() {
   }
 
   while (!m_io_finished.empty()) {
-    ceph::unique_ptr<IOContext> free_ctx(m_io_finished.front());
+    std::unique_ptr<IOContext> free_ctx(m_io_finished.front());
     m_io_finished.pop_front();
   }
 }
@@ -158,7 +158,7 @@ void Server::reader_entry() {
   dout(20) << dendl;
 
   while (!m_stopping) {
-    ceph::unique_ptr<IOContext> ctx(new IOContext(this));
+    std::unique_ptr<IOContext> ctx(new IOContext(this));
 
     dout(20) << "waiting for ggate request" << dendl;
 
@@ -215,7 +215,7 @@ void Server::writer_entry() {
   while (!m_stopping) {
     dout(20) << "waiting for io request" << dendl;
 
-    ceph::unique_ptr<IOContext> ctx(wait_io_finish());
+    std::unique_ptr<IOContext> ctx(wait_io_finish());
     if (!ctx) {
       dout(20) << "no io requests, terminating" << dendl;
       return;
index ba8aa7df1fa6142e02b47a0dadd4ea699cc1d7f1..41920b7bb4ff836922fe4b82f9b8da2bac67fb0f 100644 (file)
@@ -16,9 +16,9 @@
 namespace rbd {
 namespace mirror {
 
-typedef shared_ptr<librados::Rados> RadosRef;
-typedef shared_ptr<librados::IoCtx> IoCtxRef;
-typedef shared_ptr<librbd::Image> ImageRef;
+typedef std::shared_ptr<librados::Rados> RadosRef;
+typedef std::shared_ptr<librados::IoCtx> IoCtxRef;
+typedef std::shared_ptr<librbd::Image> ImageRef;
 
 struct ImageId {
   std::string global_id;
index 403136b4a971d5c773dd4cd84a11c9c72b392dc0..d5458404ed412ead4a0eb47cbd640f60be847555 100644 (file)
@@ -231,7 +231,7 @@ private:
       cond.Wait(lock);
 
     while(!io_finished.empty()) {
-      ceph::unique_ptr<IOContext> free_ctx(io_finished.front());
+      std::unique_ptr<IOContext> free_ctx(io_finished.front());
       io_finished.pop_front();
     }
   }
@@ -274,7 +274,7 @@ private:
   void reader_entry()
   {
     while (!terminated) {
-      ceph::unique_ptr<IOContext> ctx(new IOContext());
+      std::unique_ptr<IOContext> ctx(new IOContext());
       ctx->server = this;
 
       dout(20) << __func__ << ": waiting for nbd request" << dendl;
@@ -350,7 +350,7 @@ private:
   {
     while (!terminated) {
       dout(20) << __func__ << ": waiting for io request" << dendl;
-      ceph::unique_ptr<IOContext> ctx(wait_io_finish());
+      std::unique_ptr<IOContext> ctx(wait_io_finish());
       if (!ctx) {
        dout(20) << __func__ << ": no io requests, terminating" << dendl;
         return;