From: Sage Weil Date: Mon, 17 Oct 2016 18:27:16 +0000 (-0400) Subject: ceph-objectstore-tool: relax cur_struct_v checks X-Git-Tag: v11.1.0~600^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d698ab3e3475352ae1495f750548736ce10d87d3;p=ceph.git ceph-objectstore-tool: relax cur_struct_v checks All compat pg formats can handle past interval removal and mark-complete. Signed-off-by: Sage Weil --- diff --git a/src/tools/ceph_objectstore_tool.cc b/src/tools/ceph_objectstore_tool.cc index 6a2ae1551d7..93ee8908157 100644 --- a/src/tools/ceph_objectstore_tool.cc +++ b/src/tools/ceph_objectstore_tool.cc @@ -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;