bool OpTracker::with_slow_ops_in_flight(utime_t* oldest_secs,
int* num_slow_ops,
+ int* num_warned_ops,
std::function<void(TrackedOp&)>&& on_warn)
{
const utime_t now = ceph_clock_now();
if (visit_ops_in_flight(oldest_secs, check)) {
if (num_slow_ops) {
*num_slow_ops = slow;
+ *num_warned_ops = warned;
}
return true;
} else {
op.warn_interval_multiplier *= 2;
};
int slow = 0;
- if (with_slow_ops_in_flight(&oldest_secs, &slow, warn_on_slow_op)) {
+ if (with_slow_ops_in_flight(&oldest_secs, &slow, &warned, warn_on_slow_op)) {
stringstream ss;
ss << slow << " slow requests, "
<< warned << " included below; oldest blocked for > "
*
* @param[out] oldest_sec the amount of time since the oldest op was initiated
* @param[out] num_slow_ops total number of slow ops
+ * @param[out] num_warned_ops total number of warned ops
* @param on_warn a function consuming tracked ops, the function returns
* false if it don't want to be fed with more ops
* @return True if there are any Ops to warn on, false otherwise
*/
bool with_slow_ops_in_flight(utime_t* oldest_secs,
int* num_slow_ops,
+ int* num_warned_ops,
std::function<void(TrackedOp&)>&& on_warn);
/**
* Look for Ops which are too old, and insert warning