@@ -1860,7 +1860,7 @@ uint32_t pg_pool_t::get_random_pg_position(pg_t pg, uint32_t seed) const
18601860void pg_pool_t::encode (ceph::buffer::list& bl, uint64_t features) const
18611861{
18621862 using ceph::encode;
1863- if ((features & CEPH_FEATURE_PGPOOL3) == 0 ) {
1863+ if (! HAVE_SIGNIFICANT_FEATURE (features, PGPOOL3) ) {
18641864 // this encoding matches the old struct ceph_pg_pool
18651865 __u8 struct_v = 2 ;
18661866 encode (struct_v, bl);
@@ -1889,7 +1889,7 @@ void pg_pool_t::encode(ceph::buffer::list& bl, uint64_t features) const
18891889 return ;
18901890 }
18911891
1892- if ((features & CEPH_FEATURE_OSDENC) == 0 ) {
1892+ if (! HAVE_SIGNIFICANT_FEATURE (features, OSDENC) ) {
18931893 __u8 struct_v = 4 ;
18941894 encode (struct_v, bl);
18951895 encode (type, bl);
@@ -1912,7 +1912,7 @@ void pg_pool_t::encode(ceph::buffer::list& bl, uint64_t features) const
19121912 return ;
19131913 }
19141914
1915- if ((features & CEPH_FEATURE_OSD_POOLRESEND) == 0 ) {
1915+ if (! HAVE_SIGNIFICANT_FEATURE (features, OSD_POOLRESEND) ) {
19161916 // we simply added last_force_op_resend here, which is a fully
19171917 // backward compatible change. however, encoding the same map
19181918 // differently between monitors triggers scrub noise (even though
@@ -1964,16 +1964,16 @@ void pg_pool_t::encode(ceph::buffer::list& bl, uint64_t features) const
19641964 uint8_t v = 31 ;
19651965 // NOTE: any new encoding dependencies must be reflected by
19661966 // SIGNIFICANT_FEATURES
1967- if (!HAVE_FEATURE (features, SERVER_TENTACLE)) {
1968- if (!(features & CEPH_FEATURE_NEW_OSDOP_ENCODING )) {
1967+ if (!HAVE_SIGNIFICANT_FEATURE (features, SERVER_TENTACLE)) {
1968+ if (!HAVE_SIGNIFICANT_FEATURE (features, NEW_OSDOP_ENCODING )) {
19691969 // this was the first post-hammer thing we added; if it's missing, encode
19701970 // like hammer.
19711971 v = 21 ;
1972- } else if (!HAVE_FEATURE (features, SERVER_LUMINOUS)) {
1972+ } else if (!HAVE_SIGNIFICANT_FEATURE (features, SERVER_LUMINOUS)) {
19731973 v = 24 ;
1974- } else if (!HAVE_FEATURE (features, SERVER_MIMIC)) {
1974+ } else if (!HAVE_SIGNIFICANT_FEATURE (features, SERVER_MIMIC)) {
19751975 v = 26 ;
1976- } else if (!HAVE_FEATURE (features, SERVER_NAUTILUS)) {
1976+ } else if (!HAVE_SIGNIFICANT_FEATURE (features, SERVER_NAUTILUS)) {
19771977 v = 27 ;
19781978 } else if (!is_stretch_pool ()) {
19791979 v = 29 ;
0 commit comments