]> 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)
committerxie xingguo <xie.xingguo@zte.com.cn>
Sun, 18 Sep 2016 03:42:38 +0000 (11:42 +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>
src/tools/rebuild_mondb.cc

index a8d36ec0f02ded3b1ced83d853faae2fa4aae2cf..232df75ff622e787a2128a1850713e0647f7e48a 100644 (file)
@@ -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);