void RGWCoroutinesManager::handle_unblocked_stack(set<RGWCoroutinesStack *>& context_stacks, list<RGWCoroutinesStack *>& scheduled_stacks,
- RGWCompletionManager::io_completion& io, int *blocked_count)
+ RGWCompletionManager::io_completion& io, int *blocked_count, int *interval_wait_count)
{
ceph_assert(ceph_mutex_is_wlocked(lock));
RGWCoroutinesStack *stack = static_cast<RGWCoroutinesStack *>(io.user_info);
if (stack->is_io_blocked()) {
--(*blocked_count);
stack->set_io_blocked(false);
+ if (stack->is_interval_waiting()) {
+ --(*interval_wait_count);
+ }
}
stack->set_interval_wait(false);
if (!stack->is_done()) {
}
while (completion_mgr->try_get_next(&io)) {
- handle_unblocked_stack(context_stacks, scheduled_stacks, io, &blocked_count);
+ handle_unblocked_stack(context_stacks, scheduled_stacks, io, &blocked_count, &interval_wait_count);
}
/*
if (ret < 0) {
ldout(cct, 5) << "completion_mgr.get_next() returned ret=" << ret << dendl;
}
- handle_unblocked_stack(context_stacks, scheduled_stacks, io, &blocked_count);
+ handle_unblocked_stack(context_stacks, scheduled_stacks, io, &blocked_count, &interval_wait_count);
}
next:
canceled = true;
break;
}
- handle_unblocked_stack(context_stacks, scheduled_stacks, io, &blocked_count);
+ handle_unblocked_stack(context_stacks, scheduled_stacks, io, &blocked_count, &interval_wait_count);
iter = scheduled_stacks.begin();
}
if (canceled) {
RGWIOIDProvider io_id_provider;
void handle_unblocked_stack(std::set<RGWCoroutinesStack *>& context_stacks, std::list<RGWCoroutinesStack *>& scheduled_stacks,
- RGWCompletionManager::io_completion& io, int *waiting_count);
+ RGWCompletionManager::io_completion& io, int *waiting_count, int *interval_wait_count);
protected:
RGWCompletionManager *completion_mgr;
RGWCoroutinesManagerRegistry *cr_registry;