lkml.org 
[lkml]   [2003]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2.5.71-mm1] aio process hang on EINVAL
Suparna Bhattacharya wrote:

>The right way to implement aio poll in
>the new model would have been to setup a retry method for it
>in aio_setup_iocb(), not run generic_aio_poll() directly there.
>
>
That seems unnecessarily indirect and complicated. It also adds
additional cases for the cancellation path, furthur adding to
complexity. The aio poll mechanism is perfectly capable of arranging
callbacks itself.

The check should be:

if (-EIOCBQUEUED == ret)
return 0;
if (unlikely(ret))
goto out_put_req;

Then handling of immediate completion should be inside either
aio_setup_iocb() or generic_aio_poll(), resulting in a call to
aio_complete() and a return from aio_setup_iocb() of -EIOCBQUEUED.

On another point, I certainly don't like the way aio_run_iocb()
unconditionally completes with -EINTR on cancellation. A cancelled
read/write should return the number of bytes transferred.

[unhandled content-type:application/x-pkcs7-signature]
\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.086 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site