On Mon, Aug 18, 2003 at 11:13:48PM -0400, Jeff Macdonald wrote:
> Hi,
> I am trying to understand how one uses raw disk i/o in Linux. I

If you're not a filesystem engineer, you probably just really don't
want to do this.  This is the level at which the filesystem reads and
writes data -- it is a raw byte stream.  If you write data at this
level, you will destroy your filesystem. 

> understand that the i/o skips the kernel buffer. 

Well, IIRC, unlike most other Unix implementations, Linux disk I/O is
/always/ block I/O (i.e. buffered by the kernel) unless you apply
patches to the kernel.

However, if what you're trying to do is avoid a layer of buffers to
increase performance, have a look at memory-mapped I/O.  See the man
page for mmap(2), and/or a good book on programming on Unix systems.
I'd suggest W. Richard Stevens' "Advanced Programming in the Unix
Environment" for starters.


-- 
Derek D. Martin
http://www.pizzashack.org/
GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.
Replying to it will result in undeliverable mail.
Sorry for the inconvenience.  Thank the spammers.

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to