peer_features(CEPH_FEATURES_SUPPORTED_DEFAULT),
acting_features(CEPH_FEATURES_SUPPORTED_DEFAULT),
upacting_features(CEPH_FEATURES_SUPPORTED_DEFAULT),
- randomly_sort_nibblewise(false)
+ do_sort_bitwise(false)
{
#ifdef PG_DEBUG_REFS
osd->add_pgid(p, this);
upacting_features &= osdmap->get_xinfo(*p).features;
}
- if (g_conf->osd_debug_randomize_hobject_sort_order) {
- // randomly use a nibblewise sort (when we otherwise might have
- // done bitwise) based on some *deterministic* function such that
- // all peers/osds will agree.
- randomly_sort_nibblewise = (info.history.same_interval_since + info.pgid.ps()) & 1;
- } else {
- randomly_sort_nibblewise = false;
+ do_sort_bitwise = get_osdmap()->test_flag(CEPH_OSDMAP_SORTBITWISE);
+ if (do_sort_bitwise) {
+ assert(get_min_upacting_features() & CEPH_FEATURE_OSD_BITWISE_HOBJ_SORT);
+ if (g_conf->osd_debug_randomize_hobject_sort_order) {
+ // randomly use a nibblewise sort (when we otherwise might have
+ // done bitwise) based on some *deterministic* function such that
+ // all peers/osds will agree.
+ do_sort_bitwise =
+ (info.history.same_interval_since + info.pgid.ps()) & 1;
+ }
}
_on_new_interval();
uint64_t acting_features;
uint64_t upacting_features;
- bool randomly_sort_nibblewise;
+ bool do_sort_bitwise;
public:
const spg_t& get_pgid() const { return pg_id; }
/// true if we will sort hobjects bitwise for this pg interval
bool get_sort_bitwise() const {
- return (get_min_upacting_features() & CEPH_FEATURE_OSD_BITWISE_HOBJ_SORT) &&
- !randomly_sort_nibblewise;
+ return do_sort_bitwise;
}
void init_primary_up_acting(