On Fri, Jul 4, 2014 at 5:18 PM, Ming Lei <ming....@canonical.com> wrote:
>>
>> This leaks requests when ret < len.  I think the loop below should be
>> used in that case to fail unsubmitted requests with -EIO.
>
> I thought about the problem before, but looks it may not return 'ret'
> which is less than
> len, follows the man io_submit():
>
>        The  function  returns immediately after having enqueued all
> the requests.  On suc‐
>        cess, io_submit returns the number of  iocbs  submitted
> successfully.   Otherwise,
>        -error  is return, where error is one of the Exxx values
> defined in the Errors sec‐
>        tion.
>
> The above description looks a bit confusing, and I will check linux
> fs/aio.c to see
> if there is the case.

Ah, fs/aio.c do have the case, will fix in v6.

Thanks,

Reply via email to