[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 1/3] linux-aio: fix submit aio as a batch
From: |
Ming Lei |
Subject: |
Re: [Qemu-devel] [PATCH v3 1/3] linux-aio: fix submit aio as a batch |
Date: |
Mon, 24 Nov 2014 18:02:13 +0800 |
On Mon, Nov 24, 2014 at 5:47 PM, Paolo Bonzini <address@hidden> wrote:
>
>
> On 22/11/2014 13:16, 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)) {
>> > > + return -1;
>> >
>> > return -EAGAIN?
>>
>> It means the io queue is full, so the code has to fail the current
>> request.
>
> Right, but "-1" is "-EPERM" which doesn't make much sense. I think the
> right thing to do is to return EAGAIN, and let the owner figure it out.
> For example, a SCSI device might return a "BUSY" status code.
We can do that, but laio_submit() doesn't return the code to callers.
Thanks,
Ming Lei
[Qemu-devel] [PATCH v3 2/3] linux-aio: handling -EAGAIN for !s->io_q.plugged case, Ming Lei, 2014/11/06
[Qemu-devel] [PATCH v3 3/3] linux-aio: remove 'node' from 'struct qemu_laiocb', Ming Lei, 2014/11/06