On Wed, Apr 07, 2004 at 11:18:41AM -0700, Andrew Morton wrote:
> Andy Isaacson <address@hidden> wrote:
> > > While you're there, please add an fsync-before-closing option.
> >
> > Easy enough. How does this look? Note that C_TWOBUFS ensures the
> > output buffer is getpagesize()-aligned.
>
> Looks nice and simple. You'll need an ext2 filesystem to test it under 2.4.
I tested against a block device. Easier to just "swapoff /dev/hda2"
than to find space to make a new filesystem.
> Be aware that it's rather a challenge to actually get the O_DIRECT #define
> in scope under some glibc versions. I think you need to define _GNU_SOURCE
> or something like that.
Yeah, I had to -D_GNU_SOURCE to build standalone, but coreutils'
makefile seems to do OK.
Would there be any reason to allow O_DIRECT on the read side?
-andy