]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "os/FileStore: fix version check"
authorSage Weil <sage@redhat.com>
Wed, 14 Oct 2015 13:27:25 +0000 (09:27 -0400)
committerSage Weil <sage@redhat.com>
Fri, 16 Oct 2015 18:08:42 +0000 (14:08 -0400)
This reverts commit 14d3a2b82bea668ee2e9898d0b612812d8f7e8cc.

src/os/FileStore.cc

index 4bee72656e67a05cd88bbd9f5bad35c4d602a3e2..4b3cbc8037f053ae1faa9980f6c154419f012bbd 100644 (file)
@@ -1212,7 +1212,10 @@ int FileStore::upgrade()
   if (r == 1)
     return 0;
 
-  assert(version >= 4);  // upgrade to hammer first
+  if (version < 4) {
+    derr << "ObjectStore is old at version " << version << ".  Please upgrade to hammer v0.94.x first."  << dendl;
+    return -EINVAL;
+  }
 
   // nothing necessary in FileStore for v3 -> v4 upgrade; we just need to
   // open up DBObjectMap with the do_upgrade flag, which we already did.
@@ -1304,12 +1307,6 @@ int FileStore::mount()
         << cpp_strerror(ret) << dendl;
     goto close_fsid_fd;
   } else if (ret == 0) {
-    if (version_stamp < 4) {
-      derr << "FileStore is old at version " << version_stamp
-          << ".  Please upgrade to hammer v0.94.x first."  << dendl;
-      ret = -EINVAL;
-      goto close_fsid_fd;
-    }
     if (do_update || (int)version_stamp < g_conf->filestore_update_to) {
       derr << "FileStore::mount : stale version stamp detected: "
           << version_stamp