librbd/JournalReplay: Only Send signal when aio completions queue empty.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
This commit is contained in:
Jianpeng Ma 2015-11-27 10:27:47 +08:00
parent ce944e4cb1
commit fd684ca15d

View File

@ -158,7 +158,8 @@ void JournalReplay::handle_aio_completion(AioCompletion *aio_comp) {
}
m_aio_completions.erase(it);
m_cond.Signal();
if (m_aio_completions.empty())
m_cond.Signal();
}
void JournalReplay::aio_completion_callback(completion_t cb, void *arg) {