From owner-freebsd-hackers Fri Mar 5 7:54:58 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from mercury.inktomi.com (mercury.inktomi.com [209.1.32.126]) by hub.freebsd.org (Postfix) with ESMTP id 62E7E15194 for ; Fri, 5 Mar 1999 07:54:53 -0800 (PST) (envelope-from jplevyak@inktomi.com) Received: from tsdev.inktomi.com (tsdev.inktomi.com [209.1.32.119]) by mercury.inktomi.com (8.9.1a/8.9.1) with SMTP id HAA14634; Fri, 5 Mar 1999 07:54:44 -0800 (PST) Received: by tsdev.inktomi.com (SMI-8.6/SMI-SVR4) id HAA22602; Fri, 5 Mar 1999 07:54:35 -0800 Message-ID: <19990305075435.A22589@tsdev.inktomi.com> Date: Fri, 5 Mar 1999 07:54:35 -0800 From: John Plevyak To: Julian Elischer , John Plevyak Cc: hackers@FreeBSD.ORG Subject: Re: aio_read/write pread/pwrite References: <19990304165818.A20680@proxydev.inktomi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i In-Reply-To: ; from Julian Elischer on Thu, Mar 04, 1999 at 07:24:52PM -0800 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG You can translate base64 with metamail; available from ports/mail/metamail. john On Thu, Mar 04, 1999 at 07:24:52PM -0800, Julian Elischer wrote: > the patch is in base64.. > how do you read base64 files? > > > On Thu, 4 Mar 1999, John Plevyak wrote: > > > > > In investigating the lack of pread/pwrite, I found the bug > > report kern/8011, and the patch therein. > > > > This patch mashes fd->f_offset around the > > (*fp->f_ops->fo_read)(fp, &auio, fp->f_cred) and then resets > > it to achieve a sort of poor-mans pread/pwrite. > > > > This breaks multi-threaded programs. The same problem exists > > for aio_read/aio_write. > > > > The simple solution would be to use 'auio.uio_offset' directly > > (which is what aio_read/aio_write do), but alas, > > vn_read() mangles fp->f_offset anyway. > > > > Moreover, vn_write totally ignores auio.uio_offset == -1. > > > > The correct solution seems to be to recognize (aio.uio_offset != -1) > > as indicating 'don't mess with fp->f_offset at all!' since this is > > really what is intended in the places where it is set to non-zero. > > > > I have a patch for this which I am attaching to kern/8011, but > > I think it is more generally applicable since it should also > > fix aio_XXXX. > > > > Is anyone interested in it? > > > > john > > > > > > -- > > John Bradley Plevyak, PhD, jplevyak@inktomi.com, PGP KeyID: 051130BD > > Inktomi Corporation, 1900 S. Norfolk Street, Suite 110, San Mateo, CA 94403 > > W:(415)653-2830 F:(415)653-2801 P:(888)491-1332/5103192436.4911332@pagenet.net > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-hackers" in the body of the message > > > -- John Bradley Plevyak, PhD, jplevyak@inktomi.com, PGP KeyID: 051130BD Inktomi Corporation, 1900 S. Norfolk Street, Suite 110, San Mateo, CA 94403 W:(415)653-2830 F:(415)653-2801 P:(888)491-1332/5103192436.4911332@pagenet.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message