]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/PGMap: fix compat encoding of num_pg_by_state
authorSage Weil <sage@redhat.com>
Sun, 9 Feb 2020 15:22:56 +0000 (09:22 -0600)
committerKefu Chai <kchai@redhat.com>
Fri, 14 Feb 2020 05:43:48 +0000 (13:43 +0800)
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit b9359d0f54c4285913a6eb3bf329ec99df9faf51)

src/mon/PGMap.cc

index b7263f8b96c6e46c37083805afd729c2592f1430..3902217a38aac087d4d429dea3acdd3d3d6b6a56 100644 (file)
@@ -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);
     }
   }