Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Oct 2002 11:57:23 -0400
From:      Craig Rodrigues <rodrigc@attbi.com>
To:        freebsd-current@freebsd.org
Subject:   Re: Bad system call: aio_read()
Message-ID:  <20021012115723.A22674@attbi.com>
In-Reply-To: <20021012164925.C424@aldebaran.dx>; from Dirk.Roehrdanz@t-online.de on Sat, Oct 12, 2002 at 04:49:25PM %2B0200
References:  <20021012095302.A22260@attbi.com> <20021012142400.GA26739@rz.uni-karlsruhe.de> <20021012164925.C424@aldebaran.dx>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <un1i@rz.uni-karlsruhe.de> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021012115723.A22674>