Date: Fri, 5 Mar 1999 07:54:35 -0800 From: John Plevyak <jplevyak@inktomi.com> To: Julian Elischer <julian@whistle.com>, John Plevyak <jplevyak@inktomi.com> Cc: hackers@FreeBSD.ORG Subject: Re: aio_read/write pread/pwrite Message-ID: <19990305075435.A22589@tsdev.inktomi.com> In-Reply-To: <Pine.BSF.3.95.990304192403.22687M-100000@current1.whistle.com>; from Julian Elischer on Thu, Mar 04, 1999 at 07:24:52PM -0800 References: <19990304165818.A20680@proxydev.inktomi.com> <Pine.BSF.3.95.990304192403.22687M-100000@current1.whistle.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990305075435.A22589>