Andrea Arcangeli [andrea@suse.de] wrote:
> On Mon, Sep 03, 2001 at 03:13:42PM -0500, Bob McElrath wrote:
> > I have written a small program to use O_DIRECT (attached), after
> > applying your patch o_direct-14 to kernel 2.4.9. Opening the file with
> > O_DIRECT is successful, but attempts to write to the fd return EINVAL.
> >=20
> > Am I doing something wrong? Should I have to recompile glibc too?
>=20
> eh, the alignment and size of the buffer have basically the same
> restrictions of running read/write on a raw device, with the only
> difference that for rawio the granularity is the hardblocksize, while
> for O_DIRECT the granularity is the softblocksize of the filesystem.
Ah, thanks, it's working now. Makes sense that it should use blocksize
granularity...
> We'll have to relax the granularity of the I/O down to the hardblocksize
> for O_DIRECT too eventually.
I don't really care about the granularity. The bigger the better,
actually, since I'm streaming data to disk quickly. ;)
Thanks,
-- Bob
Bob McElrath (rsmcelrath@students.wisc.edu)=20
Univ. of Wisconsin at Madison, Department of Physics
--SUOF0GtieIMvvwua
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iEYEARECAAYFAjuUkasACgkQjwioWRGe9K2Z7ACbB4mbcNVyiipDMyYdeXinq/GJ
fJIAoNEFmrKUookWuj8H7iR912+M1C5+
=RTRJ
-----END PGP SIGNATURE-----
--SUOF0GtieIMvvwua--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/