On Mon, Nov 24, 2014 at 7:39 PM, Paolo Bonzini wrote:
>
>
> On 24/11/2014 12:31, Ming Lei wrote:
>> +static int ioq_enqueue(struct qemu_laio_state *s, struct iocb *iocb)
>> {
>> unsigned int idx = s->io_q.idx;
>>
>> +if (unlikely(idx == s->io_q.size)) {
>> +ioq_submit(s);
>> +
On 24/11/2014 12:31, Ming Lei wrote:
> +static int ioq_enqueue(struct qemu_laio_state *s, struct iocb *iocb)
> {
> unsigned int idx = s->io_q.idx;
>
> +if (unlikely(idx == s->io_q.size)) {
> +ioq_submit(s);
> +return -EAGAIN;
Only return -EAGAIN if ioq_submit(s) retur
In the submit path, we can't complete request directly,
otherwise "Co-routine re-entered recursively" may be caused,
so this patch fixes the issue with below ideas:
- for -EAGAIN or partial completion, retry the submision
in following completion cb which is run in BH context