From owner-freebsd-hackers Sun Jun 6 21:44:24 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from obie.softweyr.com (unknown [204.68.178.33]) by hub.freebsd.org (Postfix) with ESMTP id B174414BD5 for ; Sun, 6 Jun 1999 21:44:20 -0700 (PDT) (envelope-from wes@softweyr.com) Received: from softweyr.com (homer.softweyr.com [204.68.178.39]) by obie.softweyr.com (8.8.8/8.8.8) with ESMTP id WAA00600; Sun, 6 Jun 1999 22:44:15 -0600 (MDT) (envelope-from wes@softweyr.com) Message-ID: <375B4E1E.1C78700C@softweyr.com> Date: Sun, 06 Jun 1999 22:44:14 -0600 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.5 [en] (X11; U; FreeBSD 3.1-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Christopher Sedore , hackers@freebsd.org Cc: terry@whistle.com Subject: Re: Man pages for review References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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