Date: Sun, 06 Jun 1999 22:44:14 -0600 From: Wes Peters <wes@softweyr.com> To: Christopher Sedore <cmsedore@mailbox.syr.edu>, hackers@freebsd.org Cc: terry@whistle.com Subject: Re: Man pages for review Message-ID: <375B4E1E.1C78700C@softweyr.com> References: <Pine.SOL.4.10.9906062133260.20821-100000@rodan.syr.edu>
index | next in thread | previous in thread | raw e-mail
Christopher Sedore wrote:
>
> One other thing which should be noted in the docs, or fixed in the kernel.
> The aiocb struct should be bzeroed before an aio_read or aio_write because
> if you happen to have garbage in the private part of the structure, the io
> can be synchronous (look at the first few lines of aio_read in
> src/kern/vfs_aio.c for the code). I think this is a probably a standards
> violation, but have not done the legwork to find out. In any case, its a
> pain in the neck until you root around in the kernel source to find out
> why some io ops run synchronously...
>
> I'd be happy to generate a patch for the kernel code to fix this, if
> desired.
OK, I've added a warning to zero the iocb in the RESTRICTIONS subheading
and a warning about bugs context in iocb->_aiocb_private in the BUGS
subheading. Anyone reviewing these should probably refresh.
I guess you're proposing bzeroing iocb->_aiocb_private near the start
of aio_read and aio_write? It looks to me like this would solve the
problem neatly, but since these are pretty much bare syscalls I don't
know how to add this. Doing it inside the kernel seems unnecessary;
this should be done in userland. A lesson on how to do so would be
a great learning experience for me. ;^)
--
"Where am I, and what am I doing in this handbasket?"
Wes Peters Softweyr LLC
http://www.softweyr.com/~softweyr wes@softweyr.com
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?375B4E1E.1C78700C>
