Re: [Qemu-devel] [PATCH v2 06/16] block/mirror: Use CoQueue to wait on in-flight ops

2018-02-27 Thread Fam Zheng
On Mon, 01/22 23:07, Max Reitz wrote: > qemu_iovec_destroy(&op->qiov); > -g_free(op); > > -if (s->waiting_for_io) { > -qemu_coroutine_enter(s->common.co); > -} > +qemu_co_queue_restart_all(&op->waiting_requests); > +g_free(op); OK, this answers my question to pat

[Qemu-devel] [PATCH v2 06/16] block/mirror: Use CoQueue to wait on in-flight ops

2018-01-22 Thread Max Reitz
Attach a CoQueue to each in-flight operation so if we need to wait for any we can use it to wait instead of just blindly yielding and hoping for some operation to wake us. A later patch will use this infrastructure to allow requests accessing the same area of the virtual disk to specifically wait