@@ -1861,7 +1861,7 @@ uint32_t pg_pool_t::get_random_pg_position(pg_t pg, uint32_t seed) const
18611861void pg_pool_t::encode (ceph::buffer::list& bl, uint64_t features) const
18621862{
18631863 using ceph::encode;
1864- if ((features & CEPH_FEATURE_PGPOOL3) == 0 ) {
1864+ if (! HAVE_SIGNIFICANT_FEATURE (features, PGPOOL3) ) {
18651865 // this encoding matches the old struct ceph_pg_pool
18661866 __u8 struct_v = 2 ;
18671867 encode (struct_v, bl);
@@ -1890,7 +1890,7 @@ void pg_pool_t::encode(ceph::buffer::list& bl, uint64_t features) const
18901890 return ;
18911891 }
18921892
1893- if ((features & CEPH_FEATURE_OSDENC) == 0 ) {
1893+ if (! HAVE_SIGNIFICANT_FEATURE (features, OSDENC) ) {
18941894 __u8 struct_v = 4 ;
18951895 encode (struct_v, bl);
18961896 encode (type, bl);
@@ -1913,7 +1913,7 @@ void pg_pool_t::encode(ceph::buffer::list& bl, uint64_t features) const
19131913 return ;
19141914 }
19151915
1916- if ((features & CEPH_FEATURE_OSD_POOLRESEND) == 0 ) {
1916+ if (! HAVE_SIGNIFICANT_FEATURE (features, OSD_POOLRESEND) ) {
19171917 // we simply added last_force_op_resend here, which is a fully
19181918 // backward compatible change. however, encoding the same map
19191919 // differently between monitors triggers scrub noise (even though
@@ -1965,16 +1965,16 @@ void pg_pool_t::encode(ceph::buffer::list& bl, uint64_t features) const
19651965 uint8_t v = 32 ;
19661966 // NOTE: any new encoding dependencies must be reflected by
19671967 // SIGNIFICANT_FEATURES
1968- if (!HAVE_FEATURE (features, SERVER_TENTACLE)) {
1969- if (!(features & CEPH_FEATURE_NEW_OSDOP_ENCODING )) {
1968+ if (!HAVE_SIGNIFICANT_FEATURE (features, SERVER_TENTACLE)) {
1969+ if (!HAVE_SIGNIFICANT_FEATURE (features, NEW_OSDOP_ENCODING )) {
19701970 // this was the first post-hammer thing we added; if it's missing, encode
19711971 // like hammer.
19721972 v = 21 ;
1973- } else if (!HAVE_FEATURE (features, SERVER_LUMINOUS)) {
1973+ } else if (!HAVE_SIGNIFICANT_FEATURE (features, SERVER_LUMINOUS)) {
19741974 v = 24 ;
1975- } else if (!HAVE_FEATURE (features, SERVER_MIMIC)) {
1975+ } else if (!HAVE_SIGNIFICANT_FEATURE (features, SERVER_MIMIC)) {
19761976 v = 26 ;
1977- } else if (!HAVE_FEATURE (features, SERVER_NAUTILUS)) {
1977+ } else if (!HAVE_SIGNIFICANT_FEATURE (features, SERVER_NAUTILUS)) {
19781978 v = 27 ;
19791979 } else if (!is_stretch_pool ()) {
19801980 v = 29 ;
0 commit comments