void OSDShard::wait_min_pg_epoch(epoch_t need)
{
Mutex::Locker l(shard_lock);
- waiting_for_min_pg_epoch = true;
+ ++waiting_for_min_pg_epoch;
while (!pg_slots_by_epoch.empty() &&
pg_slots_by_epoch.begin()->epoch < need) {
dout(10) << need << " waiting on "
<< pg_slots_by_epoch.begin()->epoch << dendl;
min_pg_epoch_cond.Wait(shard_lock);
}
- waiting_for_min_pg_epoch = false;
+ --waiting_for_min_pg_epoch;
}
epoch_t OSDShard::get_max_waiting_epoch()
boost::intrusive::set_member_hook<>,
&OSDShardPGSlot::pg_epoch_item>,
boost::intrusive::compare<pg_slot_compare_by_epoch>> pg_slots_by_epoch;
- bool waiting_for_min_pg_epoch = false;
+ int waiting_for_min_pg_epoch = 0;
Cond min_pg_epoch_cond;
/// priority queue