]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: use journal in peek_super
authorSage Weil <sage@newdream.net>
Thu, 7 Jan 2010 22:33:25 +0000 (14:33 -0800)
committerSage Weil <sage@newdream.net>
Thu, 14 Jan 2010 21:41:40 +0000 (13:41 -0800)
src/cosd.cc
src/osd/OSD.cc
src/osd/OSD.h

index e0687d78a23a14c6cf1b8bff73fef5eba1399def..cfba432e32b057b7eeb9910acd02e3595dc3d610 100644 (file)
@@ -112,7 +112,7 @@ int main(int argc, const char **argv)
   nstring magic;
   ceph_fsid_t fsid;
   int w;
-  int r = OSD::peek_super(g_conf.osd_data, magic, fsid, w);
+  int r = OSD::peek_super(g_conf.osd_data, g_conf.osd_journal, magic, fsid, w);
   if (r < 0) {
     cerr << TEXT_RED << " ** " << TEXT_HAZARD << "ERROR: " << TEXT_RED
          << "unable to open OSD superblock on " << g_conf.osd_data << ": " << strerror_r(-r, buf, sizeof(buf)) << TEXT_NORMAL << std::endl;
index 047494abbfe63a210476809fd9e023a35f74c4ef..0784fcc6e310589aa16577e117c58c883f250054 100644 (file)
@@ -193,9 +193,9 @@ int OSD::mkfs(const char *dev, const char *jdev, ceph_fsid_t fsid, int whoami)
   return r;
 }
 
-int OSD::peek_super(const char *dev, nstring& magic, ceph_fsid_t& fsid, int& whoami)
+int OSD::peek_super(const char *dev, const char *journal, nstring& magic, ceph_fsid_t& fsid, int& whoami)
 {
-  ObjectStore *store = create_object_store(dev, NULL);
+  ObjectStore *store = create_object_store(dev, journal);
   if (!store)
        return -ENODEV;
   int err = store->mount();
index 8ed3fb39953ad3c7c079289feadb27e0c33faebe..807174987da421d56db4bd8f66dd99074d5019e1 100644 (file)
@@ -851,7 +851,7 @@ protected:
   static int find_osd_dev(char *result, int whoami);
   static ObjectStore *create_object_store(const char *dev, const char *jdev);
   static int mkfs(const char *dev, const char *jdev, ceph_fsid_t fsid, int whoami);
-  static int peek_super(const char *dev, nstring& magic, ceph_fsid_t& fsid, int& whoami);
+  static int peek_super(const char *dev, const char *journal, nstring& magic, ceph_fsid_t& fsid, int& whoami);
 
   // startup/shutdown
   int init();