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: v0.94.10~38^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=94390a3296483323d1b2c57856ea2e8ecca99b64;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 (cherry picked from commit ac7c1dca0a4f6e92e50d362784122e2d3200e6b5) --- diff --git a/src/tools/rebuild_mondb.cc b/src/tools/rebuild_mondb.cc index af3532cb5697..b853439187e7 100644 --- a/src/tools/rebuild_mondb.cc +++ b/src/tools/rebuild_mondb.cc @@ -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);