From 153a4e6db004f71e2e6993dfbf2d4c7d73de1d3f Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sun, 9 Feb 2020 09:22:56 -0600 Subject: [PATCH] mon/PGMap: fix compat encoding of num_pg_by_state Signed-off-by: Sage Weil (cherry picked from commit b9359d0f54c4285913a6eb3bf329ec99df9faf51) --- src/mon/PGMap.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } } -- 2.47.3