From: Samuel Just Date: Thu, 30 May 2019 00:31:31 +0000 (-0700) Subject: crimson/os: Move CollectionRef out of CyanStore X-Git-Tag: v15.1.0~2580^2~24 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=33528143e994353e37525736f39d8d277f973943;p=ceph-ci.git crimson/os: Move CollectionRef out of CyanStore This way, we don't need cyan_store.h to get CollectionRef Signed-off-by: Samuel Just --- diff --git a/src/crimson/os/cyan_collection.h b/src/crimson/os/cyan_collection.h index 78f1aa0a0b1..7d97df7de76 100644 --- a/src/crimson/os/cyan_collection.h +++ b/src/crimson/os/cyan_collection.h @@ -52,4 +52,6 @@ struct Collection : public boost::intrusive_ref_counter< void decode(bufferlist::const_iterator& p); }; +using CollectionRef = boost::intrusive_ptr; + } diff --git a/src/crimson/os/cyan_store.cc b/src/crimson/os/cyan_store.cc index 2486c535214..147799b9deb 100644 --- a/src/crimson/os/cyan_store.cc +++ b/src/crimson/os/cyan_store.cc @@ -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()) diff --git a/src/crimson/os/cyan_store.h b/src/crimson/os/cyan_store.h index 8b895f952f2..411ec7d179b 100644 --- a/src/crimson/os/cyan_store.h +++ b/src/crimson/os/cyan_store.h @@ -11,6 +11,7 @@ #include +#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; const std::string path; std::unordered_map coll_map; std::map new_coll_map;