]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/ObjectStore: pass cct to ctor
authorSage Weil <sage@inktank.com>
Wed, 4 Dec 2013 22:46:40 +0000 (14:46 -0800)
committerSage Weil <sage@inktank.com>
Wed, 4 Dec 2013 22:46:40 +0000 (14:46 -0800)
Signed-off-by: Sage Weil <sage@inktank.com>
src/ceph_osd.cc
src/os/ObjectStore.cc
src/os/ObjectStore.h

index 2b74fe9e8210836a811765793453254725faf258..ae7a919ce4bd20f715adbb412fa9c0403dae6781 100644 (file)
@@ -163,7 +163,8 @@ int main(int argc, const char **argv)
   }
 
   // the store
-  ObjectStore *store = ObjectStore::create(g_conf->osd_objectstore,
+  ObjectStore *store = ObjectStore::create(g_ceph_context,
+                                          g_conf->osd_objectstore,
                                           g_conf->osd_data,
                                           g_conf->osd_journal);
   if (!store) {
index 0e7a039b020e86c957dabfe6f7bb679c1483fe2c..07466f1c2502ebf468bdce1f24cd690b5cb553cd 100644 (file)
@@ -19,7 +19,8 @@
 #include "FileStore.h"
 #include "common/safe_io.h"
 
-ObjectStore *ObjectStore::create(const string& type,
+ObjectStore *ObjectStore::create(CephContext *cct,
+                                const string& type,
                                 const string& data,
                                 const string& journal)
 {
index 3494afd2b2b660bf2fd5f9087bd069c74e4bfb1c..8aa47f82a70472bf60f50d1318c055c7f258832d 100644 (file)
@@ -31,6 +31,8 @@
 #include <sys/vfs.h>    /* or <sys/statfs.h> */
 #endif /* DARWIN */
 
+class CephContext;
+
 using std::vector;
 using std::string;
 
@@ -77,7 +79,7 @@ static inline void encode(const map<string,bufferptr> *attrset, bufferlist &bl)
 }
 
 class ObjectStore {
-private:
+protected:
   string path;
 
 public:
@@ -88,7 +90,8 @@ public:
    * @param data path (or other descriptor) for data
    * @param journal path (or other descriptor) for journal (optional)
    */
-  static ObjectStore *create(const string& type,
+  static ObjectStore *create(CephContext *cct,
+                            const string& type,
                             const string& data,
                             const string& journal);