From: xie xingguo Date: Sun, 18 Sep 2016 02:43:10 +0000 (+0800) Subject: tools/rebuild_mondb: return error if ondisk version of pg_info is incompatible X-Git-Tag: v11.0.1~210^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ac7c1dca0a4f6e92e50d362784122e2d3200e6b5;p=ceph.git tools/rebuild_mondb: return error if ondisk version of pg_info is incompatible In this case "r" will be >= 0 and caller will be able to catch this kind of error. Signed-off-by: xie xingguo --- diff --git a/src/tools/rebuild_mondb.cc b/src/tools/rebuild_mondb.cc index a8d36ec0f02d..232df75ff622 100644 --- a/src/tools/rebuild_mondb.cc +++ b/src/tools/rebuild_mondb.cc @@ -410,7 +410,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);