If we have nolaggy waiters but are laggy we want to sleep. Otherwise,
we will just spin and spam the log ...
Signed-off-by: Sage Weil <sage@redhat.com>
{
Mutex::Locker l(mds->mds_lock);
while (true) {
- while (!stopping && (mds->finished_queue.empty() && mds->waiting_for_nolaggy.empty())) {
+ while (!stopping &&
+ mds->finished_queue.empty() &&
+ (mds->waiting_for_nolaggy.empty() || mds->beacon.is_laggy())) {
cond.Wait(mds->mds_lock);
}