{
uint64_t costs = 0;
- std::lock_guard<std::mutex> l2(osr->qlock);
- for (auto& i : b->txcs) {
- TransContext *txc = &i;
- txc->log_state_latency(logger, l_bluestore_state_deferred_aio_wait_lat);
- txc->state = TransContext::STATE_DEFERRED_CLEANUP;
- costs += txc->cost;
+ {
+ std::lock_guard<std::mutex> l2(osr->qlock);
+ for (auto& i : b->txcs) {
+ TransContext *txc = &i;
+ txc->log_state_latency(logger, l_bluestore_state_deferred_aio_wait_lat);
+ txc->state = TransContext::STATE_DEFERRED_CLEANUP;
+ costs += txc->cost;
+ }
+ osr->qcond.notify_all();
}
- osr->qcond.notify_all();
throttle_deferred_bytes.put(costs);
std::lock_guard<std::mutex> l(kv_lock);
deferred_done_queue.emplace_back(b);