]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/osd_types: fix pg_pool_t encoding for hammer 21283/head
authorSage Weil <sage@redhat.com>
Sat, 7 Apr 2018 18:36:32 +0000 (13:36 -0500)
committerSage Weil <sage@redhat.com>
Sat, 7 Apr 2018 19:44:44 +0000 (14:44 -0500)
If we are missing the hammer feature, we will also be missing the
luminous feature, but we should still encode like hammer.

Analogous fix to e28e0c617af8825ae92cced5d87cc4f403709e48

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 37c22b273959c6ca54808f3cb8d22a2d250d0c1b)

src/osd/osd_types.cc

index 0fdbb65307c4857a90059857df9d8146fa5597c2..4572c026ce3213257776e20e89058d2b877c66a9 100644 (file)
@@ -1543,8 +1543,7 @@ void pg_pool_t::encode(bufferlist& bl, uint64_t features) const
     // this was the first post-hammer thing we added; if it's missing, encode
     // like hammer.
     v = 21;
-  }
-  if (!HAVE_FEATURE(features, SERVER_LUMINOUS)) {
+  } else if (!HAVE_FEATURE(features, SERVER_LUMINOUS)) {
     v = 24;
   }