From: Sage Weil Date: Sun, 9 Feb 2020 15:22:56 +0000 (-0600) Subject: mon/PGMap: fix compat encoding of num_pg_by_state X-Git-Tag: v14.2.10~184^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=153a4e6db004f71e2e6993dfbf2d4c7d73de1d3f;p=ceph.git mon/PGMap: fix compat encoding of num_pg_by_state Signed-off-by: Sage Weil (cherry picked from commit b9359d0f54c4285913a6eb3bf329ec99df9faf51) --- diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc index b7263f8b96c..3902217a38a 100644 --- a/src/mon/PGMap.cc +++ b/src/mon/PGMap.cc @@ -63,7 +63,7 @@ void PGMapDigest::encode(bufferlist& bl, uint64_t features) const uint32_t n = num_pg_by_state.size(); encode(n, bl); for (auto p : num_pg_by_state) { - encode((uint32_t)p.first, bl); + encode((int32_t)p.first, bl); encode(p.second, bl); } }