]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/os: Move CollectionRef out of CyanStore
authorSamuel Just <sjust@redhat.com>
Thu, 30 May 2019 00:31:31 +0000 (17:31 -0700)
committerSamuel Just <sjust@redhat.com>
Thu, 30 May 2019 17:53:42 +0000 (10:53 -0700)
This way, we don't need cyan_store.h to get CollectionRef

Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/os/cyan_collection.h
src/crimson/os/cyan_store.cc
src/crimson/os/cyan_store.h

index 78f1aa0a0b1874c107df3a65df022270c89aa4ac..7d97df7de7660aef3629ce46e02abbabdf9b386f 100644 (file)
@@ -52,4 +52,6 @@ struct Collection : public boost::intrusive_ref_counter<
   void decode(bufferlist::const_iterator& p);
 };
 
+using CollectionRef = boost::intrusive_ptr<Collection>;
+
 }
index 2486c53521464b1e61215b94494ad93d8904108b..147799b9deb51c0644a7fa35a49972508da22cb4 100644 (file)
@@ -129,13 +129,13 @@ CyanStore::list_objects(CollectionRef c,
     std::move(objects), next);
 }
 
-CyanStore::CollectionRef CyanStore::create_new_collection(const coll_t& cid)
+CollectionRef CyanStore::create_new_collection(const coll_t& cid)
 {
   auto c = new Collection{cid};
   return new_coll_map[cid] = c;
 }
 
-CyanStore::CollectionRef CyanStore::open_collection(const coll_t& cid)
+CollectionRef CyanStore::open_collection(const coll_t& cid)
 {
   auto cp = coll_map.find(cid);
   if (cp == coll_map.end())
index 8b895f952f201cbc82b573a8e88fc2649cd35a0c..411ec7d179bf32b49e2ff8211537765575b2f8e7 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <seastar/core/future.hh>
 
+#include "crimson/os/cyan_collection.h"
 #include "osd/osd_types.h"
 #include "include/uuid.h"
 
@@ -21,7 +22,6 @@ class Transaction;
 
 // a just-enough store for reading/writing the superblock
 class CyanStore {
-  using CollectionRef = boost::intrusive_ptr<Collection>;
   const std::string path;
   std::unordered_map<coll_t, CollectionRef> coll_map;
   std::map<coll_t,CollectionRef> new_coll_map;