Bug #2748
include/CompatSet.h, osd/osd_types.h inconsistent use of mask argument
0%
Associated revisions
CompatSet: users pass bit indices rather than masks
CompatSet users number the Feature objects rather than
providing masks. Thus, we should do
mask |= (1 << f.id) rather than mask |= f.id.
In order to detect old, broken encodings, the lowest
bit will be set in memory but not set in the encoding.
We can reconstruct the correct mask from the names map.
This bug can cause an incompat bit to not be detected
since 1|2 == 1|2|3.
fixes: #2748
Signed-off-by: Samuel Just <sam.just@inktank.com>
CompatSet: users pass bit indices rather than masks
CompatSet users number the Feature objects rather than
providing masks. Thus, we should do
mask |= (1 << f.id) rather than mask |= f.id.
In order to detect old, broken encodings, the lowest
bit will be set in memory but not set in the encoding.
We can reconstruct the correct mask from the names map.
This bug can cause an incompat bit to not be detected
since 1|2 == 1|2|3.
fixes: #2748
Signed-off-by: Samuel Just <sam.just@inktank.com>
History
#2 Updated by Samuel Just about 11 years ago
- Status changed from New to Resolved