From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 3 01:59:19 2007 Return-Path: Delivered-To: hackers@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FBB016A41B; Mon, 3 Dec 2007 01:59:19 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7AFF713C448; Mon, 3 Dec 2007 01:59:19 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from [127.0.0.1] (root@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id lB31xFi3031051; Mon, 3 Dec 2007 01:59:17 GMT (envelope-from davidxu@freebsd.org) Message-ID: <47536330.40502@freebsd.org> Date: Mon, 03 Dec 2007 10:00:16 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.13) Gecko/20070516 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Julian Elischer References: <474F2DD5.3010508@elischer.org> In-Reply-To: <474F2DD5.3010508@elischer.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@FreeBSD.org, re@FreeBSD.org Subject: Re: MFC TO 6.X (6.3?) to fix aio_return() ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Dec 2007 01:59:19 -0000 Julian Elischer wrote: > > This diff is a partial MFC (picking parts out of -current) > that makes aio_return() return the error return of a completed AIO > request. (as it does on othe OS's and in 7.x). > > The man page for 6.x and other OS's indicate that aio_return shoud > return all the same results as a returning read() or write() > including setting errno on error. > > in 6.x this does not happen. on 7.0 it does. > > The included test program can show the result when using gnop() > to simulate IO errors. > > BTW the test program could be used as a start to sample code as to how > to use kqueue and aio together. > > > If people agree this is worth fixing, it would be nice to get it in 6.3 > > > Looks OK to me. Regards, David Xu