]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tools/rebuild_mondb: return error if ondisk version of pg_info is incompatible
authorxie xingguo <xie.xingguo@zte.com.cn>
Sun, 18 Sep 2016 02:43:10 +0000 (10:43 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 22 Nov 2016 03:47:00 +0000 (11:47 +0800)
In this case "r" will be >= 0 and caller will be able to catch
this kind of error.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
(cherry picked from commit ac7c1dca0a4f6e92e50d362784122e2d3200e6b5)

src/tools/rebuild_mondb.cc

index af3532cb569756edc6aef7e0ba941787d9f2c74f..b853439187e720d31a5c3e10ace0593cef477c1a 100644 (file)
@@ -412,7 +412,7 @@ int update_pgmap_pg(ObjectStore& fs, MonitorDBStore& ms)
     }
     if (struct_v < PG::cur_struct_v) {
       cerr << "incompatible pg_info: v" << struct_v << std::endl;
-      return r;
+      return -EINVAL;
     }
     version_t latest_epoch = 0;
     r = ms.get(prefix, stringify(pgid.pgid), bl);