Project

General

Profile

Bug #2748

include/CompatSet.h, osd/osd_types.h inconsistent use of mask argument

Added by Samuel Just about 11 years ago. Updated about 11 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Associated revisions

Revision 470796b5 (diff)
Added by Samuel Just about 11 years ago

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 <>

Revision 1a23bd69 (diff)
Added by Samuel Just almost 11 years ago

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 <>

History

#2 Updated by Samuel Just about 11 years ago

  • Status changed from New to Resolved

Also available in: Atom PDF