On Mon, Nov 24, 2014 at 7:39 PM, Paolo Bonzini <pbonz...@redhat.com> 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);
>> +        return -EAGAIN;
>
> Only return -EAGAIN if ioq_submit(s) returns 0?  Otherwise reload idx
> and go on.

Good point.

Thanks,
Ming Lei

Reply via email to