From b9359d0f54c4285913a6eb3bf329ec99df9faf51 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 --- 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 e78508d4b4623..b512d5caa3d5b 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.39.5