Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S264873AbTFQSRg (ORCPT ); Tue, 17 Jun 2003 14:17:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S264875AbTFQSRf (ORCPT ); Tue, 17 Jun 2003 14:17:35 -0400 Received: from r2d2.aoltw.net ([64.236.137.26]:62425 "EHLO netscape.com") by vger.kernel.org with ESMTP id S264873AbTFQSRV (ORCPT ); Tue, 17 Jun 2003 14:17:21 -0400 Message-ID: <3EEF5E70.8000602@netscape.com> Date: Tue, 17 Jun 2003 11:31:12 -0700 From: jgmyers@netscape.com (John Myers) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030529 X-Accept-Language: en-us, en MIME-Version: 1.0 To: suparna@in.ibm.com CC: Daniel McNeil , Andrew Morton , Linux Kernel Mailing List , "linux-aio@kvack.org" Subject: Re: [PATCH 2.5.71-mm1] aio process hang on EINVAL References: <1055810609.1250.1466.camel@dell_ss5.pdx.osdl.net> <3EEE6FD9.2050908@netscape.com> <20030617085408.A1934@in.ibm.com> In-Reply-To: <20030617085408.A1934@in.ibm.com> Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=sha1; boundary="------------ms090606060602090504050201" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6968 Lines: 120 This is a cryptographically signed message in MIME format. --------------ms090606060602090504050201 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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. --------------ms090606060602090504050201 Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIL0zCC A9YwggM/oAMCAQICBAIAAeYwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCVVMxGDAWBgNV BAoTD0dURSBDb3Jwb3JhdGlvbjEcMBoGA1UEAxMTR1RFIEN5YmVyVHJ1c3QgUm9vdDAeFw0w MTA2MDExMjQ3MDBaFw0wNDA2MDEyMzU5MDBaMIGTMQswCQYDVQQGEwJVUzELMAkGA1UECBMC Q0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxGzAZBgNVBAoTEkFtZXJpY2EgT25saW5lIElu YzEZMBcGA1UECxMQQU9MIFRlY2hub2xvZ2llczEnMCUGA1UEAxMeSW50cmFuZXQgQ2VydGlm aWNhdGUgQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDi718sdkOJSxpf s+X4qm+LL4FNZ/+9Sg9jLsTchfaeLEkmIP8AF+SIiGne/YNX4KMRGRGq1ty877PSFS5Uxm58 v9m5w0bTCQWE5VNcSO2EhZoOOz0WB1zws3mrmhClvMGk0XhMBuVkQfwFJWMm6+8Mx25UoYzO VFe2H5LashJLjQIDAQABo4IBgjCCAX4wTQYDVR0fBEYwRDBCoECgPoY8aHR0cDovL3d3dzEu dXMtaG9zdGluZy5iYWx0aW1vcmUuY29tL2NnaS1iaW4vQ1JML0dURVJvb3QuY2dpMB0GA1Ud DgQWBBQp27Itg35/iyO7wsxmuTnoKfMChjBmBgNVHSAEXzBdMEYGCiqGSIb4YwECAQUwODA2 B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6q6B4X+l/UdD9NBQN408wC6pxfv7xE03XC/gKedJFqvmYlvNvD LQI14XV/Agy5DqdrGELxod5jggXDRW/sE8A/GeCYSGplqayPK6iT4StUyfdlPpMAAAAAAAA= --------------ms090606060602090504050201-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/