]> git.apps.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)
committerSage Weil <sage@redhat.com>
Sun, 9 Feb 2020 15:22:56 +0000 (09:22 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/PGMap.cc

index e78508d4b4623c625fcf2464e0bf1115ec0b1750..b512d5caa3d5b3e0063a028f6710d0834d38a59c 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);
     }
   }