From owner-freebsd-current Sat Oct 12 8:58: 3 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F2B9237B404 for ; Sat, 12 Oct 2002 08:58:00 -0700 (PDT) Received: from dibbler.ne.client2.attbi.com (dibbler.ne.client2.attbi.com [24.61.41.247]) by mx1.FreeBSD.org (Postfix) with ESMTP id 25E9243EB2 for ; Sat, 12 Oct 2002 08:58:00 -0700 (PDT) (envelope-from rodrigc@attbi.com) Received: from dibbler.ne.client2.attbi.com (localhost.ne.attbi.com [127.0.0.1]) by dibbler.ne.client2.attbi.com (8.12.6/8.12.5) with ESMTP id g9CFvNCK023043 for ; Sat, 12 Oct 2002 11:57:23 -0400 (EDT) (envelope-from rodrigc@dibbler.ne.client2.attbi.com) Received: (from rodrigc@localhost) by dibbler.ne.client2.attbi.com (8.12.6/8.12.6/Submit) id g9CFvNj2023042 for freebsd-current@freebsd.org; Sat, 12 Oct 2002 11:57:23 -0400 (EDT) Date: Sat, 12 Oct 2002 11:57:23 -0400 From: Craig Rodrigues To: freebsd-current@freebsd.org Subject: Re: Bad system call: aio_read() Message-ID: <20021012115723.A22674@attbi.com> References: <20021012095302.A22260@attbi.com> <20021012142400.GA26739@rz.uni-karlsruhe.de> <20021012164925.C424@aldebaran.dx> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="45Z9DzgjV8m4Oswq" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20021012164925.C424@aldebaran.dx>; from Dirk.Roehrdanz@t-online.de on Sat, Oct 12, 2002 at 04:49:25PM +0200 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --45Z9DzgjV8m4Oswq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Oct 12, 2002 at 04:49:25PM +0200, Dirk Roehrdanz wrote: > Hello, > > On 0, Philipp Mergenthaler wrote: > > On Sat, Oct 12, 2002 at 09:53:02AM -0400, Craig Rodrigues wrote: > > > I just did a cvsup and rebuilt the world on my -CURRENT system. > > > If I try to run the following program, I get a "Bad system call" coredump: > > [...] > > > 2660 a.out CALL aio_read(0xbfbffb88) > > > 2660 a.out RET aio_read -1 errno 78 Function not implemented > > > > Does your kernel configuration file contain the line "options VFS_AIO"? > > I have a kernel (with this option)+world from yesterday, and aio_read works. I do not have options VFS_AIO in my kernel config. > you can get this functionality with "kldload aio" Thanks, doing a kldload aio worked. Where is stuff like this documented for end-users? In this patch to /usr/src/sys/sys/syscalls.master that AIO was made a loadable module: ======================================================================= Revision 1.101 / (download) - annotate - [select for diffs], Sat Dec 29 07:13:45 2001 UTC (9 months, 1 week ago) by alfred Branch: MAIN Changes since 1.100: +8 -8 lines Diff to previous 1.100 (colored) Make AIO a loadable module. ======================================================================= I am trying to port the ACE library ( http://www.cs.wustl.edu/~schmidt/ACE.html ) to FreeBSD-CURRENT, and it is very confusing that code in -STABLE which compiled and worked, does not work the same way in -CURRENT. (ie. the code compiles, but it crashes because of a new kernel option not being enabled or a module not being kldload'ed). This will be very confusing to end-users of ACE on FreeBSD unless it is documented. Would the following patch be acceptable for the aio_read man page? I can supply a similar patch to the other POSIX aio functions. Thanks. -- Craig Rodrigues http://www.gis.net/~craigr rodrigc@attbi.com --45Z9DzgjV8m4Oswq Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="aio_read.2.patch.txt" --- aio_read.2.orig Sat Oct 12 11:42:52 2002 +++ aio_read.2 Sat Oct 12 11:55:57 2002 @@ -179,6 +179,33 @@ .Fa iocb->aio_offset would be invalid. .El +.Sh KERNEL OPTIONS +The following kernel configuration option +(see +.Xr config 8 ) +is required +.Pp +.Dl "options VFS_AIO" +.Pp +If you do not want AIO support included in the kernel, but +want to use it occasionally, do not add the +.Dv VFS_AIO +option. Instead, load the +.Nm aio +module as desired: +.Pp +.Dl kldload aio +.Pp +.Sh SEE ALSO +.Xr aio_cancel 2 , +.Xr aio_error 2 , +.Xr aio_return 2 , +.Xr aio_suspend 2 , +.Xr aio_waitcomplete 2 , +.Xr aio_write 2 , +.Xr config 8 , +.Xr kldload 8 , +.Xr kldunload 8 .Sh STANDARDS The .Fn aio_read --45Z9DzgjV8m4Oswq-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message