]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-objectstore-tool: relax cur_struct_v checks
authorSage Weil <sage@redhat.com>
Mon, 17 Oct 2016 18:27:16 +0000 (14:27 -0400)
committerSage Weil <sage@redhat.com>
Tue, 18 Oct 2016 13:26:31 +0000 (09:26 -0400)
All compat pg formats can handle past interval removal
and mark-complete.

Signed-off-by: Sage Weil <sage@redhat.com>
src/tools/ceph_objectstore_tool.cc

index 6a2ae1551d7c1edbf1d16b7b3cd2eb14fcece2ac..93ee890815722b4f3884c5c39008e182171fe539 100644 (file)
@@ -3273,9 +3273,9 @@ int main(int argc, char **argv)
       ObjectStore::Transaction tran;
       ObjectStore::Transaction *t = &tran;
 
-      if (struct_ver != PG::cur_struct_v) {
+      if (struct_ver < PG::compat_struct_v) {
         cerr << "Can't remove past-intervals, version mismatch " << (int)struct_ver
-          << " (pg)  != " << (int)PG::cur_struct_v << " (tool)"
+          << " (pg)  < compat " << (int)PG::compat_struct_v << " (tool)"
           << std::endl;
         ret = -EFAULT;
         goto out;
@@ -3298,9 +3298,9 @@ int main(int argc, char **argv)
       ObjectStore::Transaction tran;
       ObjectStore::Transaction *t = &tran;
 
-      if (struct_ver != PG::cur_struct_v) {
-       cerr << "Can't mark-complete, version mismatch " << (int)struct_ver
-            << " (pg)  != " << (int)PG::cur_struct_v << " (tool)"
+      if (struct_ver < PG::compat_struct_v) {
+        cerr << "Can't mark-complete, version mismatch " << (int)struct_ver
+            << " (pg)  < compat " << (int)PG::compat_struct_v << " (tool)"
             << std::endl;
        ret = 1;
        goto out;